TypeError: path.join is not a function code example Example: join method in express app.use('/static', express.static(path.join(__dirname, 'public')))