简体   繁体   中英

module.js 474 throw err

I just installed the nodejs in my laptop and Im not sure how to run a js file in the node. I tried the following command, node C:\\Program Files\\nodejs\\file.js but it shows this error

module.js:474 throw err 

Anyone has any idea? Im totally a newbie.

you have to install node modules first.

cd C:\Program Files\nodejs\
npm install
node file.js

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