app.set('port', port) 'TypeError: undefined is not a function'. Beginner, need ideas

后端 未结 6 954
春和景丽
春和景丽 2021-02-04 04:12

I\'m an amateur learning to build with node.js. I\'ve been following a tutorial to create my first node.js app. It worked perfectly until I entered \'npm start\'. The log is:

6条回答
  •  渐次进展
    2021-02-04 04:51

    Intaned of calling export please use module.export end the end of your script.

    exports = app;
    module.exports = app;

提交回复
热议问题