Muhammad Usman Muhammad Usman - 8 months ago 116
Javascript Question

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