• -------------------------------------------------------------
  • ====================================

nodejs命令行升级

技能 dewbay 4年前 (2020-04-28) 2289次浏览 已收录 0个评论 扫描二维码
文章目录[隐藏]

安装全局 n 模块:

C:\Users\Administrator>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.7: wanted {“os”:”!win32″,”arch”:”
any”} (current: {“os”:”win32″,”arch”:”x64″})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache_logs\2017-05-02T02_08_33_861Z-d
ebug.log

报错哦,那执行下面的命令:

C:\Users\Administrator>npm install -g n –force
npm WARN using –force I sure hope you know what you are doing.
C:\Program Files\nodejs\node_global\n -> C:\Program Files\nodejs\node_global\nod
e_modules\n\bin\n
C:\Program Files\nodejs\node_global
`– n@2.1.7

4、升级NodeJs 到最新版本:

升级到最新稳定版本:

n stable

升级到最新版本:

n latest

升级到指定版本:

n 0.10.26


露水湾 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:nodejs命令行升级
喜欢 (5)
[]
分享 (0)
关于作者:
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址