2
**npm ERR!** code EBADPLATFORM
**npm ERR!** notsup Unsupported platform for inotify@1.4.2: 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
ymonad
  • 11,710
  • 1
  • 38
  • 49
Bhavin Thummar
  • 181
  • 10
  • 7
  • what is your node version? – Emad Emami Oct 24 '17 at 06:08
  • @ Emad Emami, I have a Latest Version of node v6.11.4 – Bhavin Thummar Oct 24 '17 at 06:19
  • it seem inotify support only < version 6 (NodeJS versions 0.10.x, 0.12.x, 4.x.x, 5.x.x and IO.js 1.x, 2.x, 3.x are currently supported and tested.) – Emad Emami Oct 24 '17 at 06:22
  • node-inotify only supports linux: https://github.com/c4milo/node-inotify/blob/v1.4.2/package.json#L19-L21 – ymonad Oct 24 '17 at 07:30
  • Has anyone figured this out. I have the same issue and don't know how to fix this either. I got a project from another group and I get this error when I run the npm install dev command. Is there any way to fix this? – Esko918 Jun 25 '18 at 01:39
  • Possible duplicate of [Unsupported platform for inotify@1.4.1: wanted {"os":"linux","arch":"any"}](https://stackoverflow.com/questions/41816384/unsupported-platform-for-inotify1-4-1-wanted-oslinux-archany) – Michael Freidgeim Nov 25 '19 at 07:33

3 Answers3

5

This is possibly due to the dev package which gets installed with npm and this problem generally occurs with Mac OS.

Run the below command to remove the dev package.

npm uninstall dev --save

I hope I'm able to help with this answer.

Pratap Sharma
  • 2,633
  • 2
  • 18
  • 32
1

I got the same error using nom, but I tried with Yarn, it worked.

$ npm i dev jest
  npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
  npm ERR! code EBADPLATFORM
  npm ERR! notsup Unsupported platform for inotify@1.4.2: 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

But then I tried with yarn

$ yarn add --dev jest

This might not have fix the problem with npm but it fixed this error for me

Eddy Ekofo
  • 541
  • 6
  • 13
1

Below command worked for me.

sudo npm -g uninstall dev --save

More details on uninstalling npm package can be found here : How to uninstall npm modules in node js?

ThusharaJ
  • 409
  • 4
  • 7