E:\nodejs>npm install -g express
express@4.13.4 C:\Users\Administrator\AppData\Roaming\npm\node_modules\express
├── escape-html@1.0.3
├── array-flatten@1.1.1
├── utils-merge@1.0.0
├── cookie-signature@1.0.6
├── vary@1.0.1
├── content-type@1.0.1
├── methods@1.1.2
├── fresh@0.3.0
├── merge-descriptors@1.0.1
├── content-disposition@0.5.1
├── etag@1.7.0
├── parseurl@1.3.1
├── cookie@0.1.5
├── range-parser@1.0.3
├── serve-static@1.10.2
├── path-to-regexp@0.1.7
├── depd@1.1.0
├── qs@4.0.0
├── finalhandler@0.4.1 (unpipe@1.0.0)
├── on-finished@2.3.0 (ee-first@1.1.1)
├── proxy-addr@1.0.10 (forwarded@0.1.0, ipaddr.js@1.0.5)
├── type-is@1.6.12 (media-typer@0.3.0, mime-types@2.1.10)
├── accepts@1.2.13 (negotiator@0.5.3, mime-types@2.1.10)
├── debug@2.2.0 (ms@0.7.1)
└── send@0.13.1 (destroy@1.0.4, statuses@1.2.1, ms@0.7.1, mime@1.3.4, http-er
rors@1.3.1)
E:\nodejs>express -v
'express' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
E:\nodejs>npm install -g express-generator
C:\Users\Administrator\AppData\Roaming\npm\express -> C:\Users\Administrator\App
Data\Roaming\npm\node_modules\express-generator\bin\express
express-generator@4.13.1 C:\Users\Administrator\AppData\Roaming\npm\node_modules
\express-generator
├── sorted-object@1.0.0
├── mkdirp@0.5.1 (minimist@0.0.8)
└── commander@2.7.1 (graceful-readlink@1.0.1)
E:\nodejs>express -v
error: unknown option `-v'
E:\nodejs>express -V
4.13.1
E:\nodejs>