我正在尝试通过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包,试试哟医生,但最终也失败了。这是错误日志:
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
我已经在谷歌搜索但仍然找不到任何解决方案(或者我可能错过了一个)。需要任何建议和帮助,thx。
答案 0 :(得分:0)
尝试更新npm
npm install -g npm