I first messed around with Node.js and decided to create a simple application using express. I followed the github instructions in an empty directory:
npm install -g express
express
npm install -d
node app.js
When switching to localhost:3000I get the following error:
Express
500 Error: Cannot find module './lib/jade'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (C:\dev\gravity_kata\node_modules\jade\index.js:4:5)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
When you look under node_modules\jade\lib, I see all the files in the Jade library, but not jade. So I created a folder under lib called jade and moved the library files there, and now my default application is working.
Now, having seen that I have almost no experience with Node.js and Express, I am sure that I did something wrong. Does anyone know what is going on here?
Edit:
. Jade index.js lib\jade lib, jade.js. , , jade.js ? Jade npm, lib jade.js. lib Jade , .
- npm jade.js. packages.json , , 0.21.0. - , ?