When I try to run the app.js
file created by express, I get the following error:
$ node app.js
node.js:134
throw e; // process.nextTick
It may happen, if you're using windows, that the environment variable NODE_PATH
is not set, and thus when you execute node fileName.js
it won't find the libraries.
Check for the variable on your console, and if not present, create it. Give it the NODE_HOME\node_modules
value, where NODE_HOME
is your node install dir. This path is where npm install puts every module upon downloading.
require.paths
is removed, use the NODE_PATH
environment variable instead.