javascript 在 Windows 7 64 位更新 node.js
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24822612/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
updating node.js in windows 7 64 bit
提问by Temp O'rary
How to update node.js in Windows 7 64-bit OS?
如何在 Windows 7 64 位操作系统中更新 node.js?
I tried the famous :
我尝试了著名的:
npm cache clean -f
npm install -g n
n stable
But in npm install -g n
it failed giving the following error:
但是在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: [email protected]
.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
Please suggest a solution. I suspect this could be because of the 64-bit version of the OS.
请提出解决方案。我怀疑这可能是因为操作系统的 64 位版本。
Thanks and regards.
谢谢并恭祝安康。
回答by mscdex
You can update simply by executing the Windows installer for the latest node.js version from here.
您只需从此处执行最新 node.js 版本的 Windows 安装程序即可进行更新。
n
doesn't work on Windows because it's basically a giant (bash) shell script.
n
在 Windows 上不起作用,因为它基本上是一个巨大的 (bash) shell script。