1

我正在尝试通过 windows cmd 安装 keystone.js,但仍然出现如下错误:

npm ERR! yo@1.3.3 postinstall: `yodoctor`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the yo@1.3.3 postinstall script.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     yodoctor
npm ERR! You can get their info via:
npm ERR!     npm owner ls yo
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "generator-keystone"
npm ERR! cwd C:\Users\Pisa Family
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

C:\Users\Pisa Family>npm install -g yo
C:\Users\Pisa Family\AppData\Roaming\npm\yo -> C:\Users\Pisa Family\AppData\Roaming\npm\node_modules\yo\cli.js

我也尝试安装 yo 软件包,尝试 yo 医生,但最终也失败了。这是错误日志:

C:\Users\Pisa Family>npm install -g yo
C:\Users\Pisa Family\AppData\Roaming\npm\yo -> C:\Users\Pisa Family\AppData\Roaming\npm\node_modules\yo\cli.js

> yo@1.3.3 postinstall C:\Users\Pisa Family\AppData\Roaming\npm\node_modules\yo
> yodoctor


npm ERR! yo@1.3.3 postinstall: `yodoctor`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the yo@1.3.3 postinstall script.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     yodoctor
npm ERR! You can get their info via:
npm ERR!     npm owner ls yo
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! cwd C:\Users\Pisa Family
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

我已经在谷歌上搜索,但仍然找不到任何解决方案(或者我可能错过了一个)。需要任何建议和帮助,谢谢。

4

1 回答 1

0

尝试更新 npm

npm install -g npm
于 2016-05-20T22:46:40.850 回答