Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 996
theednorc Avatar asked May 12 '19 22:05

theednorc


2 Answers

  • 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.

like image 166
egor518 Avatar answered Sep 28 '22 14:09

egor518


When seeing this kind of message on ionic or anywhere else, do run npm audit fix and see if you can successfully follow the given advice to resolve all "high severity vulnerability" issues and contribute the resulting updated dependencies back to the given codebase.

What's happening here is that a package called chokidar is being used to "watch" filesystem directories for "events" (like files being added). chokidar is a wrapper for Linux-, Windows-, and Mac-specific filesystem-watching packages, of which fsevents is the Mac variant. So, I am pretty sure anything that uses chokidar is going to have fsevents as an optional dependency, but as others have said, this WARN message can be safely ignored, as chokidar supports all common desktop architectures.

like image 34
rayrrr Avatar answered Sep 28 '22 16:09

rayrrr