2017-03-07 98 views
0
C:\Users\ASUS>npm install -g n 
npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "n" 
npm ERR! node v6.10.0 
npm ERR! npm v4.3.0 
npm ERR! code EBADPLATFORM 

npm ERR! notsup Unsupported platform for [email protected]: 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:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2017-03-07T11_09_13_826Z-debug.log 

这是错误,我不知道如何解决它。当我安装node.js时,它给了我一些错误。并且安装失败

回答

1

您尝试安装的软件包n没有Windows支持(如提到的in the README)。

+0

并在错误文本中清楚地表示。 – Paul

+1

@保罗我的经验是,大多数人不会阅读错误文本。这将防止在这里问很多问题; D – robertklep

+0

感谢您的帮助! –

3

纵观自述文件the library you're trying to install(你应该永远,永远!):

(遗憾的是不支持Windowsň但如果你能使其工作,发送。 !在pull请求)

果然,这就是错误消息告诉您:

Unsupported platform for [email protected]: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"}) 

这意味着要将wanted包安装在!win32平台(换句话说,不是Windows)上,但您当前的平台不符合该要求。

+0

感谢您的帮助! –

相关问题