nodejs命令行升级

安装全局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

作者:doitplayer
来源:CSDN
原文:https://blog.csdn.net/DoitPlayer/article/details/71077333
版权声明:本文为博主原创文章,转载请附上博文链接!

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容