How to fix 'Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

adler picture adler · May 13, 2019 · Viewed 71.1k times · Source

Testing binary Binary is fine npm WARN rollback Rolling back [email protected] failed (this is probably harmless):

EPERM: operation not permitted, lstat 'C:\Users\orca yoon\Documents\IonicProjects\starters\epic\node_modules\fsevents\node_modules'

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1105 packages from 1050 contributors and audited 53269 packages in 445.94s found 1 high severity vulnerability run npm audit fix to fix them, or npm audit for details

Answer

Ali David picture Ali David · May 13, 2019
  • First,

Run your command prompt or powershell as Administrator role. Then you'll get avoided with PERMISSION ERROR.

  • Second,

Ignore npm audit fix. It only suggests you to renovate all of your package.json dependencies up-to-date. You should preserve the settings clarified in package.json.

  • Third,

If you're working on ubuntu or OS X, you won't face this issue, I guess.


PS:

According to your reply, I'd like to think about the workaround.

  • Remove the local node_modules & package-lock.json
  • Clean npm cache by npm cache verify
  • Update the global npm by sudo npm i -g npm
  • Reinstall the local node_modules by npm i

Hope this might help.