npm install error fsevents in Ohter Mac Platforms
Problem
When I tried to run npm install, it gave me this error
error code EBADPLATFORM
error notsup Unsupported platform for fsevents@1.1.3: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”win32",”arch”:”x64"})
Cause:
Error is indicating that you are installing fsevents module in other OS rather than Mac. fsevents module is only work for Mac Operating system
Solution:
the simple solution is to ignore fsevents when you are using Windows or Linux operating system, this can be done by:
1 — adding this to package.json solved the problem for me
"optionalDependencies": {
"fsevents": "*"
}
2 — Another solution would be to ignore optional dependencies during the installation (I got it from search the problem on internet) : npm install --no-optional polymer-cli -g