2017-03-02 81 views
0

我是nodejs中的新成員,在我的項目中運行npm install時出現錯誤。安裝節點包時出錯?

npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ 
node_modules\\npm\\bin\\npm-cli.js" "i" 
npm ERR! node v7.7.1 
npm ERR! npm v4.1.2 
npm ERR! code EBADPLATFORM 

npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin", 
"arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm ERR! notsup Valid OS: darwin 
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:\projects\rehouse\src\dd_rehouse_renewal_win\npm-debug.log 

我不知道這個錯誤:Unsupported platform for [email protected]: wanted {"os":"darwin", "arch":"any"} (current: {"os":"win32","arch":"x64"}) 請幫我解決這個問題。

+0

井「想達到os達爾文(當前win32)」對我來說聽起來像任何fsevents是,它需要MacOS而不是windows。但我不熟悉節點知道該怎麼做:/ –

+0

它可能是版本問題,請參閱此樹https://github.com/npm/npm/issues/14042 –

+0

也嘗試'npm cache clean'和然後再次運行你的命令 –

回答

0

this的討論中,我會先嚐試方法1。如果還是不行,請嘗試方法2.

  1. 地址:

    "optionalDependencies": { "fsevents": "*" },

    您的package.json,然後用--no-optional

  2. 安裝嘗試降級NPM版本下一個較低的穩定版本。