When I try to run the app.js file created by the expression, I get the following error:
$ node app.js node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'express' at Function._resolveFilename (module.js:320:11)
When I print the expression 'express -version', I get a 2.3.3 return statement. I used npm to install express. I had to manually make npm using the following instructions:
git clone http://github.com/isaacs/npm.git cd npm sudo make install
Error Error: Cannot find module 'express' .
Do I need to do something after installing npm and the expression in order to explicitly see the modules created by npm?
My node - version: 0.4.6 My express - this version: 2.3.3 My npm version - version: 1.0.6
Express is installed globally. I used the -g flag to set it.
Edit: When I try to execute node -e require.paths, I get:
['/home/user/.node_modules', '/home/user/.node_libraries', '/ usr / local / lib / node']
So node does not detect the npm installation. How do I get node to detect an npm installation?
Kelp May 7 '11 at 7:08 a.m. 2011-07-07 07:08
source share