【问题标题】:Error Installing KeyStone.Js on windows 7 64 bit在 Windows 7 64 位上安装 KeyStone.Js 时出错
【发布时间】:2015-03-30 23:42:51
【问题描述】:

我正在尝试通过 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

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

【问题讨论】:

  • Yeoman 的最新版本是 1.4.5。不确定为什么要安装 1.3.3。我会尝试npm uninstall -g yonpm cache clean。然后尝试重新安装npm install -g yo
  • 尝试以管理员身份打开一个新的cmd,然后重新测试整个安装过程。很多时候 npm 需要管理员属性。

标签: windows node.js npm keystonejs


【解决方案1】:

尝试更新 npm

npm install -g npm

【讨论】:

    猜你喜欢
    • 2012-10-11
    • 1970-01-01
    • 1970-01-01
    • 2011-01-26
    • 2017-09-04
    • 2015-06-26
    • 2013-12-10
    • 2020-04-03
    • 1970-01-01
    相关资源
    最近更新 更多