downloaded mean stck zip from mean.io did an npm install after few minutes I got an error. Please see screenshot. what do I do?
从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
3 个解决方案
#1
3
Looks like mean stacks postinstall script is hardcoded with Unix style paths. In Unix ./somethig/or/another
signifies accessing the something
directory starting HERE (the meaning of .
).
看起来像堆栈的postinstall脚本是用Unix样式路径硬编码的。在Unix ./somethig/or/another表示从HERE开始访问某个目录(含义。)。
I'd suggest submitting a bug on their GitHub page to start. Then you might be able to get away with editing the package.json
to have the post install script use Windows style paths. It would be something like node_modules\bower\bin\bower install
. I don't have windows so cannot say for certain.
我建议在他们的GitHub页面上提交一个bug来启动。然后,您可以通过编辑package.json来使安装后脚本使用Windows样式路径。这将类似于node_modules \ bower \ bin \ bower install。我没有窗户,所以不能肯定。
#2
1
The postinstall doesn't work really well now for this repository on Windows. Try to run npm install -g bower
and then bower install
in the project's folder. It should do the same thing without postinstall.
对于Windows上的此存储库,postinstall现在不能很好地工作。尝试运行npm install -g bower,然后在项目的文件夹中进行bower install。没有postinstall,它应该做同样的事情。
#3
0
If you want to call something from node_modules/bin
, you don't have to point at it directly. You can just call the tool by name in NPM script definition, i.e.:
如果要从node_modules / bin调用某些内容,则不必直接指向它。您可以在NPM脚本定义中按名称调用该工具,即:
"postinstall": "bower install"
#1
3
Looks like mean stacks postinstall script is hardcoded with Unix style paths. In Unix ./somethig/or/another
signifies accessing the something
directory starting HERE (the meaning of .
).
看起来像堆栈的postinstall脚本是用Unix样式路径硬编码的。在Unix ./somethig/or/another表示从HERE开始访问某个目录(含义。)。
I'd suggest submitting a bug on their GitHub page to start. Then you might be able to get away with editing the package.json
to have the post install script use Windows style paths. It would be something like node_modules\bower\bin\bower install
. I don't have windows so cannot say for certain.
我建议在他们的GitHub页面上提交一个bug来启动。然后,您可以通过编辑package.json来使安装后脚本使用Windows样式路径。这将类似于node_modules \ bower \ bin \ bower install。我没有窗户,所以不能肯定。
#2
1
The postinstall doesn't work really well now for this repository on Windows. Try to run npm install -g bower
and then bower install
in the project's folder. It should do the same thing without postinstall.
对于Windows上的此存储库,postinstall现在不能很好地工作。尝试运行npm install -g bower,然后在项目的文件夹中进行bower install。没有postinstall,它应该做同样的事情。
#3
0
If you want to call something from node_modules/bin
, you don't have to point at it directly. You can just call the tool by name in NPM script definition, i.e.:
如果要从node_modules / bin调用某些内容,则不必直接指向它。您可以在NPM脚本定义中按名称调用该工具,即:
"postinstall": "bower install"