Express module not found when installed with NPM

后端 未结 14 1556
庸人自扰
庸人自扰 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:22

    On Ubuntu 12.04 you have to add the export NODE_PATH=/usr/local/lib/node_modules to your /.bashrc to use globally installed modules.

提交回复
热议问题