express 安裝完畢後需要安裝express-generator
阿新 • • 發佈:2018-12-24
[[email protected] ~]$ cnpm install express
✔ Installed 1 packages
✔ Run 0 scripts
✔ All packages installed (49 packages installed from npm registry, used 2s(network 2s), speed 49.51kB/s, json 48(109.61kB), tarball 0B)
[[email protected] ~]$ express --help
bash: express: 未找到命令...
安裝軟體包“nodejs-express”以提供命令“express”? [N/y] n
[ [email protected] ~]$ cnpm install -g express-generator
Downloading express-generator to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator_tmp
Copying /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator_tmp/[email protected]@express-generator to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator
Installing express-generator's dependencies to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator/node_modules
[1/5] [email protected] installed at node_modules/[email protected]@commander
[2/5] [email protected] installed at node_modules/[email protected]@sorted-object
[3/5] [email protected] installed at node_modules/[email protected]@ejs
[4/5] [email protected] installed at node_modules/[email protected] @mkdirp
[5/5] [email protected] installed at node_modules/[email protected]@minimatch
All packages installed (9 packages installed from npm registry, used 2s(network 2s), speed 46.33kB/s, json 9(16.66kB), tarball 81.66kB)
[[email protected]] link /usr/local/node-v10.13.0-linux-x64/bin/[email protected] -> /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator/bin/express-cli.js
[[email protected] ~]$