You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MM12-Danil:~ danil$ npm install -g express-generator
npm http GET https://registry.npmjs.org/express-generator
npm http 304 https://registry.npmjs.org/express-generator
npm http GET https://registry.npmjs.org/commander/1.3.2
npm http GET https://registry.npmjs.org/mkdirp/0.3.5
npm http 304 https://registry.npmjs.org/commander/1.3.2
npm http 304 https://registry.npmjs.org/mkdirp/0.3.5
npm http GET https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/keypress
/usr/local/share/npm/bin/express -> /usr/local/share/npm/lib/node_modules/express-generator/bin/express
express-generator@4.2.0 /usr/local/share/npm/lib/node_modules/express-generator
├── mkdirp@0.3.5
└── commander@1.3.2 (keypress@0.1.0)
MM12-Danil:~ danil$ express --help
-bash: express: command not found
So I decided to place bin to /usr/local/bin. Then I got another error:
MM12-Danil:node_js_demo danil$ express --help
module.js:340
throw err;
^
Error: Cannot find module 'commander'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/bin/express:3:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
But it works when I installed it locally:
MM12-Danil:photo danil$ npm install express-generator express
npm http GET https://registry.npmjs.org/express-generator
.....
npm http 304 https://registry.npmjs.org/ms/0.6.2
express-generator@4.2.0 node_modules/express-generator
├── mkdirp@0.3.5
└── commander@1.3.2 (keypress@0.1.0)
express@4.4.2 node_modules/express
....
MM12-Danil:photo danil$ node_modules/express-generator/bin/express --help
Usage: express [options] [dir]
Options:
-h, --help output usage information
-V, --version output the version number
-e, --ejs add ejs engine support (defaults to jade)
-H, --hogan add hogan.js engine support
-c, --css <engine> add stylesheet <engine> support (less|stylus|compass) (defaults to plain css)
-f, --force force on non-empty directory
May be I did something wrong?
The text was updated successfully, but these errors were encountered:
Hello,
I'd like to install express-generator by using this guide: http://expressjs.com/guide.html#executable
But I got error:
So I decided to place bin to /usr/local/bin. Then I got another error:
MM12-Danil:node_js_demo danil$ express --help
But it works when I installed it locally:
May be I did something wrong?
The text was updated successfully, but these errors were encountered: