Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

yarnpkg

When running yarn check, I see:

info [email protected]: The platform "linux" is incompatible with this module.                                                                                                                                        
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.

This GitHub comment says that the message can be safely ignored.

Is there a way to prevent it from occurring in the first place?

like image 846
Tom Hale Avatar asked Nov 03 '18 08:11

Tom Hale


2 Answers

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.

like image 136
S.. Avatar answered Nov 18 '22 06:11

S..


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
like image 21
Tom Hale Avatar answered Nov 18 '22 07:11

Tom Hale