尝试在Windows

时间:2015-06-10 16:43:02

标签: node.js npm yeoman

我在Windows上,正在尝试按照http://yeoman.io/learning/index.html的说明操作。到目前为止,我已经成功安装了grunt-cli和bower但是当我尝试使用以下命令安装你时...

npm install -g yo

...命令提示符返回:

> spawn-sync@1.0.11 postinstall C:\Users\Aaron\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! file ;C:\Windows\system32\cmd.exe
npm ERR! path ;C:\Windows\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Windows\system32\cmd.exe

npm ERR! spawn-sync@1.0.11 postinstall: `node postinstall`
npm ERR! spawn ;C:\Windows\system32\cmd.exe ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync@1.0.11 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Aaron\AppData\Roaming\npm\node_modules\npm-debug.log

有谁知道这到底意味着什么以及如何解决它?

2 个答案:

答案 0 :(得分:0)

您可以尝试使用此功能:https://github.com/npm/npm/issues/7781

我认为这有助于您解决问题。

获得节点& npm in cmd。您可以在Windows环境变量中设置节点位置。然后重启你的cmd&再试一次。

答案 1 :(得分:0)

尝试使用功能npm软件包管理器重新安装安装程序,然后返回到npm安装。