-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
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?