从 mean.io 下载 mean stck zip 做了 npm 安装 几分钟后我得到一个错误。请看截图。我该怎么办?
npm http 200 https://registry.npmjs.org/event-emitter/-/event-e
mitter-0.2.2.tgz
> mean@1.0.0 postinstall C:\ss\D1\google\04\mean\mean-stack
> ./node_modules/bower/bin/bower install
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! weird error 1
npm ERR! not ok code 0
最佳答案
看起来 mean stacks 安装后脚本是用 Unix 风格的路径硬编码的。在 Unix 中,./somethig/or/another
表示访问从 HERE 开始的 something
目录(.
的含义)。
我建议先在他们的 GitHub 页面上提交错误。然后,您可以编辑 package.json
以使安装后脚本使用 Windows 样式路径。它类似于 node_modules\bower\bin\bower install
。我没有 window ,所以不能肯定。
关于node.js - 为 MEAN 堆栈运行 "' 时,如何摆脱错误 .' is not recognized as an internal or external command" 'npm install'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18413157/