2017-03-07 94 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

感謝您的幫助! –

相關問題