5

I'm trying to set up a project for react. however, while I run npm install, it throws this error:

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for inotify@1.4.6: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS:    linux
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   darwin
npm ERR! notsup Actual Arch: x64 

Apparently, It looks like this library is not supported on my mac. I hope some workaround can resolve this issue instead of removing this library. kindly suggest how can I resolve this issue.

adamgy
  • 4,543
  • 3
  • 16
  • 31
Archit
  • 51
  • 4
  • find another library for MacOS – KetZoomer Apr 14 '21 at 17:16
  • 1
    @KetZoomer actually this is one of the dependencies of some other library. can't figure out any other option – Archit Apr 14 '21 at 17:18
  • have you checked that you're not accidentally trying to install the `dev` package? see https://stackoverflow.com/questions/41816384/unsupported-platform-for-inotify1-4-1-wanted-oslinux-archany – adamgy Apr 14 '21 at 19:26
  • @adamgy. I tried that too. but it didn't work. – Archit Apr 14 '21 at 21:28
  • @Archit have you found a solution by chance? I'm getting this error both on macOS and on a Windows 10 VM I have installed thru Parallels... – Matvey Aug 12 '21 at 17:58
  • oooh this magically worked for me: npm uninstall dev --save – Matvey Aug 12 '21 at 18:01

1 Answers1

0

Stealing the answer from here: https://stackoverflow.com/a/59159117/10431460

Simply running this fixed the issue for me:

npm uninstall dev --save
Matvey
  • 335
  • 4
  • 18