Cli: [QUESTION] How to properly get rid of npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents

Created on 6 Apr 2020  ·  4Comments  ·  Source: npm/cli

Hi all.

I found several topics discussing how to get rid of messages like these:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

and it seems like npm i -f is gonna "fix" this issue, but unfortunately what has never been explained is what exactly it's doing and how it's working.

Another advice was to run npm i with parameter --no-optional.
Well, first - I'm not gonna skip other optionals as well just because npm complains about this one (which one cannot even install on Linux).
And second - it's not convenient to run npm with additional --no-optional parameter every time, eh?

So my question is: how to get rid of this specific warning about "fsevents" which is not supposed to be installed on Linux? Is there a way to add some "rule" or something into package.json to not warn on standard OSes like Linux and keep it showing on proprietary ones?

Question

Most helpful comment

https://github.com/npm/cli/pull/169#issuecomment-667304732

Yep, it’s fixed in v7.

All 4 comments

Hey @jacksonrayhamilton, it's been just about two years since you said you'd do this in a year or two. How about resubmitting that PR? 🙂

:laughing: I was being sarcastic.

Someone else already resubmitted it here: https://github.com/npm/cli/pull/169

I stumbled on this blog post recently which alludes to the problem being fixed in v7: https://blog.npmjs.org/post/617484925547986944/npm-v7-series-introduction

Coming Attractions
In the coming npm v7 posts, we’ll cover:

  • Fixing the “noisy chokidar/fsevents” problem

Hopefully someone from the NPM org will stop by some of these open issues and confirm that explicitly.

😆 I was being sarcastic.

Oh, I know. I was mostly trolling the project organizers for the ridiculousness that was this thread and the fact that this is still an issue. 🙃

Someone else already resubmitted it here: #169

I stumbled on this blog post recently which alludes to the problem being fixed in v7: https://blog.npmjs.org/post/617484925547986944/npm-v7-series-introduction

Coming Attractions
In the coming npm v7 posts, we’ll cover:

  • Fixing the “noisy chokidar/fsevents” problem

Hopefully someone from the NPM org will stop by some of these open issues and confirm that explicitly.

Awesome!

https://github.com/npm/cli/pull/169#issuecomment-667304732

Yep, it’s fixed in v7.

Was this page helpful?
0 / 5 - 0 ratings