Module.js 474 throw err

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

module.js:474 throw err 

Does anyone have an idea? I am completely new.

+4
source share
1 answer

you need to install node modules first.

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

Source: https://habr.com/ru/post/1661957/


All Articles