Silence 'info [email protected]: The platform "linux" is incompatible with this module.'

Currently it does not seem possible to prevent messages about optional dependencies which are not explicitly required.

See the following yarn GitHub issues:

  • [FR] a way to ignore packages #4611
  • Add flag to ignore individual optional packages #5251

Not sure about yarn check but for installing/updating: yarn --silent or even better yarn --silent --ignore-optional

yarn --silent installs optional deps, but without the output.

Note: If running with --ignore-optional flag you may be dependent on some of the optional dependencies without realising it. So I recommend deleting your node_modules folder and yarn.lock file and then running yarn --ignore-optional before testing your project. If it turns out there were optional deps you required, then add them as [dev] deps [accordingly]. Although if it was just fsevents and that was never being installed, no worries.

Tags:

Yarnpkg