javascript - npm install -g n 报错

查看:164
本文介绍了javascript - npm install -g n 报错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

为了更新nodejs安装n模块,但是报了如下错误,这是为什么呢?

C:\Windows\System32>npm i -g n
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\node.exe" "C:\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g"
n"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
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! Please include the following file with any support request:
npm ERR!     C:\Windows\System32\npm-debug.log

解决方案

一看你就没仔细的看文档,n模块不支持windows系统。
https://www.npmjs.com/package/n
图下边括号的内容,自己翻一下。

这篇关于javascript - npm install -g n 报错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆