Not compatible with your operating system or architecture: [email protected]

70,259

Solution 1

I was facing the same issue with this dependecy when building other application.

Just for the sake of knowledge and to people who are not well used to NPM, and thus uncertain about how their applications will behave:

Since fsevents is an API in OS X allows applications to register for notifications of changes to a given directory tree. Running:

npm install --no-optional

Will do the trick, with no drawbacks.

Solution 2

It's not an error, it's just a warning: it's an optional dependency.

Solution 3

You can tell npm not to install optional dependencies by default using the command line below:

npm config set optional false

Solution 4

If you're getting ERR! not WARN a likely cause of this issue is that you're using a really outdated version of NPM

For me, I shelled into some server, and was like "why won't this work?", getting this error:

npm ERR! Linux 4.4.0-130-generic
npm ERR! argv "/home/william/.nvm/versions/node/v4.4.3/bin/node" "/home/william/.nvm/versions/node/v4.4.3/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /home/william/app/mcard-api/npm-debug.log

Turns out this server (that I only recently acquired) was running npm 2.15.1. I re-installed nvm, and nvm install --lts fixed it.

Solution 5

I found if you use "yarn add ." Yarn will exclude the fsevents will not throw an error.

Share:
70,259

Related videos on Youtube

randomuser
Author by

randomuser

Updated on December 22, 2020

Comments

  • randomuser
    randomuser over 3 years

    I'm using Ubuntu 15.04. While running the following command:

    npm install fsevents
    

    I'm getting following error:

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: [email protected]
    npm WARN [email protected] No repository field.
    

    Has anybody solved this?

  • randomuser
    randomuser about 8 years
    it worked without this library as well. but any way to install this library?
  • JMM
    JMM about 8 years
    I don't know if there's any way to install it (my guess would be no), but even if you could install it I don't know what that would accomplish since it's a wrapper for a native OS X API.
  • Steven Scott
    Steven Scott over 7 years
    There is the caution that this will hide all optional dependency failures. May not be a big deal as the dependencies are optional, but the ones that would work on your platform will also not be reported if they failed to install for some reason.
  • K. Siva Prasad Reddy
    K. Siva Prasad Reddy over 7 years
    I too faced the same problem but --no-optional didn't solved the problem. I downgraded npm version to 3.10.7 then it worked fine.
  • Leo
    Leo over 7 years
    The first installer I've saw in my life that can't do a simple OS check.
  • fredw
    fredw over 6 years
    no-optional didn't work for me, but upgrading node did the trick (to version 6.11.4 on Windows, not sure what version I had before)
  • Mohammed H
    Mohammed H about 6 years
    There were no errors! But I started searching assuming there were errors! Thanks for my eye opening!!