Failed optional dependency /chokidar/fsevents:

chokidar/fsevents error
npm warn optional skipping optional dependency
npm warn optional skipping optional dependency fsevents 12 9 node_modulesfsevents
one of your dependencies needs to upgrade to fsevents v2
nodemon not compatible with your operating system
skipping optional dependency fsevents 12 9 node_moduleswebpack dev server node_modulesfsevents
npm warn optional skipping optional dependency: fsevents 1.2 7 node_modulesfsevents
fsevents warning

I am installing "cordova-plugin-geolocation" via npm but "cordova-plugin-geolocation" is unable to install. I am seeing the following warnings:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:

npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14

Is there any possible solution?

I used the following command to install NPM dependencies with the parameter NO-OPTIONAL

npm install --no-optional

source: https://github.com/ariesjia/grunt-riot/issues/16

What does npm mean by 'Skipping failed optional dependency , npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or  @mfinkelstine Somewhere in your dependency tree, fsevents is listed in a package.json under dependencies, when it should be optionalDependencies. Run npm ls to view your dependency tree and you will find the culprit!

Make .npmignore with node_modules chokidar/fsevents inside

failed optional dependency /chokidar/fsevents · Issue #16 · ariesjia , On Windows 10 npm update returns: npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not  Fixes #11632, reducing the log level of nonfatal errors when installing optional dependencies on an unsupported platform (e.g. fsevents on GNU/Linux). Adapts the changes from #12841 to the current state of the repo and endeavors to implement the requested changes in this issue comment.

I was getting this error when I run gulp command

Error: watch node_modules/bootstrap/scss/bootstrap.scss ENOSPC
        at _errnoException (util.js:1022:11)
        at FSWatcher.start (fs.js:1382:19)
        at Object.fs.watch (fs.js:1408:11)
        at createFsWatchInstance

I ran this and it works for me

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Failed optional dependency /chokidar/fsevents · Issue #14191 · npm , npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or  Here is our dependency tree $ npm ls fsevents `-- sass@1.24.0 `-- chokidar@2.1.8 `-- UNMET OPTIONAL DEPENDENCY fsevents@1.2.11 Here is the log of the fsevents build attempt > fsevents@1.2.11 install C:\dev\projects\our_project ode_modules\fsevents > node-gyp rebuild

npm - node, npm install npm WARN optional Skipping failed optional dependency /chokidar/​fsevents: npm WARN notsup Not compatible with your  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. – Steven Scott Dec 12 '16 at 21:07

npm install command, You can try npm install --no-optional to skip optional dependencies. npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN  It occurs because fsevents is an optional dependency, used only when project is run on macOS environment (the package provides 'Native Access to Mac OS-X FSEvents'). And since you're running your project on Windows, fsevents is skipped as irrelevant.

Is it alright to have a list of npm WARN's in your project? : node, Not compatible with your operating system or architecture: fsevents@1.1.2 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm  cmedinasoriano force-pushed the cmedinasoriano:log-failed-optional-platform-dependencies-as-info branch from a2a4017 to c48fc7c Feb 24, 2019 zkat added semver:major needs-discussion labels Mar 4, 2019

Comments
  • Were you able to fix it?
  • It looks like this is your first answer. Please edit your question to expand on your solution more and explain yourself a little further. Short one to two word answers generally don't fly on SO since they are not intended to help only the original user, but also everyone else who might get here through a search engine.
  • Generally, answers are much more helpful if they include an explanation of what the code is intended to do, and why that solves the problem without introducing others.