我如何摆脱错误“”。 是不是被认为是一个内部或外部命令“运行'npm安装'为MEAN堆栈?

从mean.io下载意味着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 

看起来像意味着堆栈postinstall脚本是用Unix样式path硬编码的。 在Unix中./somethig/or/another表示访问从这里开始的something目录(的含义)。

我build议在他们的GitHub页面上提交一个bug来启动。 然后,你可以通过编辑package.json来让安装脚本使用Windows风格的path。 这将是像node_modules\bower\bin\bower install 。 我没有窗户,所以不能肯定地说。

现在,对于Windows上的这个存储库,postinstall现在不能很好地工作。 尝试运行npm install -g bower ,然后在项目文件夹中bower install 。 它应该做同样的事情,没有后安装。

如果你想从node_modules/bin调用一些东西,你不必直接指向它。 您可以在NPM脚本定义中按名称调用该工具,即:

 "postinstall": "bower install"