Express module not found when installed with NPM

后端 未结 14 1544
庸人自扰
庸人自扰 2020-12-22 22:59

When I try to run the app.js file created by express, I get the following error:

$ node app.js

node.js:134
        throw e; // process.nextTick         


        
14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 23:18

    It looks like the easiest way to do this is to run npm install from your app's folder. This tells npm to hook everything up.

    It's the last instruction after express :

    ...
    dont forget to install dependencies:
    $ cd  && npm install
    

提交回复
热议问题