升级nod错误:npm ERR! notsup Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (cu...

阿_贵IP属地: 吉林
字数 144阅读 2,384

升级Node.js时

node -v

npm cache clean -f

运行 npm install -g n 报错误

npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for n@2.1.8: 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

去官网https://nodejs.org/en/download/下载 LTS版本的 nod

安装到"C:\Program Files (x86)\nodejs"目录即可

"C:\Program Files (x86)" 用于安装32位软件安装目录

"C:\Program Files"用于安装64位软件安装目录

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
0人点赞
更多精彩内容,就在简书APP
"小礼物走一走,来简书关注我"
还没有人赞赏,支持一下
阿_贵<a href="https://github.com/xyangui" rel="nofol...
总资产2共写了2.4W字获得34个赞共7个粉丝

推荐阅读更多精彩内容