I've installed Node.js
, express.js
and the express-generator
globally.
But when I try to create a new project using the express
at the CLI, I get this error:
module.js:471
throw err;
^
Error: Cannot find module 'commander'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/nodejs/express-generator/bin/express:3:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:
Error message advises to "re-install express-generator with sudo
",
even if I haven't changed the node_modules
variable path or anything else.
I haven't yet found a working solution. Please help me out on this