Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install error (code EBADPLATFORM)

Tags:

node.js

npm

When I tried to run npm install, it gave me this error:

$ npm install npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: 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! A complete log of this run can be found in: npm ERR!     C:\Users\Aroma\AppData\Roaming\npm-cache\_logs\2018-03-  25T11_33_58_338Z-debug.log 

The node version:

$node -v v8.10.0  

I tried every thing, like:

npm cache clear  npm cache verify npm i -g npm@latest 

I even tried uninstalling and reinstalling Nodejs again but still get the same error.

like image 984
abeerShami Avatar asked Mar 25 '18 11:03

abeerShami


People also ask

How do I repair npm permissions?

You can fix this problem using one of three options: Change the permission to npm's default directory. Change npm's default directory to another directory. Install Node with a package manager that takes care of this for you.


2 Answers

I had the same issue, deleting my "package-lock.json" and re-running npm install worked

like image 56
Thendokhae Makahane Avatar answered Sep 18 '22 08:09

Thendokhae Makahane


Error is indicating that you are installing fsevents module in other OS rather than Mac

fsevents module only works for Mac Operting system

like image 37
Nishant Dixit Avatar answered Sep 21 '22 08:09

Nishant Dixit