简体   繁体   中英

Error when installing node package?

I new in nodejs and have a error when run npm install in my project.

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

I don't know this error: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin", "arch":"any"} (current: {"os":"win32","arch":"x64"}) Please help me solve it.

From this discussion, I would try approach 1 first. If that doesn't work, try approach 2.

  1. Add:

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

    to your package.json and then install with --no-optional

  2. Try downgrading your npm version to the next lower stable version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM