在 Windows 7 64 位中更新 node.js

新手上路,请多包涵

如何在 Windows 7 64 位操作系统中更新 node.js?

我尝试了著名的:

 npm cache clean -f
npm install -g n
n stable

但在 npm install -g n 它失败并给出以下错误:

 C:\Windows\system32>npm install -g n
npm http GET https://registry.npmjs.org/n
npm http 304 https://registry.npmjs.org/n
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: n@1.2
.9
npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: ia32

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "n"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code EBADPLATFORM
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0

请提出解决方案。我怀疑这可能是因为 64 位版本的操作系统。

谢谢并恭祝安康。

原文由 Temp O‘rary 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 323
1 个回答

您只需从 此处 执行最新 node.js 版本的 Windows 安装程序即可进行更新。

n 在 Windows 上不起作用,因为它基本上是一个 巨大的 (bash) shell 脚本

原文由 mscdex 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题