I try to learn node.js, and I want to use express framework for it, but when i copy and paste hello world example from expressjs.com page, it shows error:
/home/tomek/dev/node/express_server.js:1
uire, module, __filename, __dirname) { var app = require('express').createServ
^
TypeError: undefined is not a function
at Object.<anonymous> (/home/tomek/dev/node/express_server.js:1:92)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Function.Module.runMain (module.js:490:10)
at startup (node.js:124:16)
at node.js:807:3
I've installed express through npm and it looks ok. Its in node_modules folder in app's root directory.