I\'m using ubuntu and I\'m trying to run a script using nodejs and i\'m getting this error.
/home/bebz/Documents/test# node server.js
module.js:338
throw err;
Whenever you get module.js:338 throw err;
try to check whether npm
is installed in your machine or not.
UserName$ npm -v
If you get the version name, then it's clear that npm
is installed.
If you don't get the version name, there is some problem with your installation or it is not installed.
To install npm
, type this command in your Terminal:
UserName$ curl -0 -L http://npmjs.org/install.sh | sudo sh
Also notice I added sudo
before the sudo sh
command depending on your users permissions.