[英]Error when installing node package?
我是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 fsevents@1.0.15: 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 fsevents@1.0.15: wanted {"os":"darwin", "arch":"any"} (current: {"os":"win32","arch":"x64"})
請幫我解決。
從這個討論中,我將首先嘗試方法1。 如果這不起作用,請嘗試方法2。
加:
"optionalDependencies": { "fsevents": "*" },
到您的package.json,然后使用--no-optional
安裝
嘗試將您的npm版本降級到下一個較低的穩定版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.