0
$ node test.js
internal/modules/cjs/loader.js:883
  throw err;
  ^

I tried all the ways (adding/checking PATH route for node js, restarting, using another files etc) and couldn't find why my node doesn't run properly. When I'm typing node -v it returns me version, so it is installed, I go to VSCode and open my any folder. Then in JS file when I'm typing for instance node app.js it throws me error that I wrote above. Any idea what should I try else?

Enzoenzo
  • 67
  • 8

1 Answers1

-2

Seems like node modules are not properly installed. Try these steps and let me know:

  • delete node_modules
  • delete package-lock.json file
  • npm install
  • npm start

should be good to go.

Waleed Ahmad
  • 446
  • 3
  • 15
  • Hey, thank you for your response. But as I mentioned above, I tried reinstall everything necessary for node js but still throws error. – Enzoenzo Jan 11 '21 at 22:09