微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javascript – 在Windows 7中运行Express.js.

我在Windows 7中尝试使用install express(使用-g for global)

 npm install -g express

我得到以下,没有错误:

 npm http GET https://registry.npmjs.org/express
 ...
 npm http GET https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
 npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
 npm http 304 https://registry.npmjs.org/debug/0.8.0
 [email protected] C:\Users\xxx\AppData\Roaming\npm\node_modules\express
 ├── [email protected]
 ├── [email protected]
 ..    
 ├── [email protected] ([email protected])
 └── [email protected] ([email protected], [email protected])

当我输入快递时,我得到:

 'express' is not recognized as an internal or external command. 

知道为什么会这样吗?

解决方法:

我在Windows 8.1上遇到了同样的问题
使用此命令

npm install -g express-generator

要么

npm install -g express-generator@'version'

喜欢

npm install -g express-generator@3

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐