javascript - 在 Windows 7 64 位中更新 node.js

标签 javascript node.js npm windows-7-x64

如何在 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 位版本。

感谢和问候。

最佳答案

您只需执行来自 here 的最新 node.js 版本的 Windows 安装程序即可进行更新.

n 在 Windows 上不起作用,因为它基本上是 giant (bash) shell script .

关于javascript - 在 Windows 7 64 位中更新 node.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24822612/

相关文章:

javascript - 在 C3 Js 图表中首次加载页面时启用/禁用图例元素。此外,管理图例元素根据复选框值启用/禁用

javascript - noflo:动态组件加载 - 组件 [名称] 不适用于基本 [路径]

node.js - Nodejs 错误 : Global connection already exists. 首先调用 sql.close()

npm tslint 不报错

javascript - jquery 鼠标滚轮缩放(改变 div 的宽度)

javascript - Angular JS - 来自另一个输入值的输入值

javascript - vuejs 中的 webpack 无法访问 dev.env.js 中定义的键

ruby-on-rails - 实时 ruby​​ 应用程序 : CRAMP vs NODE. JS

javascript - ReactJs - 为什么子事件不会改变父事件的状态?

javascript - Bower:ENOGIT Git 未安装或不在 PATH 中