简体   繁体   中英

npm install throws error after a fresh install of node modules

After upgrading my node to v 4.2 , executed npm install for my node project as a root user from my home directory and it is successful. But started throwing module not found or can not find js file errors including binding exception while starting my app.

You solved your problem. Because installing application without superuser permission prevent the other dependencies to be installed.

I recommend to enter to super user / root by sudo su - when installing.

Run 'sudo npm install' to avoid exceptions and it creates node_modules directory with current user. This solved my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM