Silence 'info fsevents@1.2.4: The platform "linux" is incompatible with this module.'

Viewed 4747

When running yarn check, I see:

info fsevents@1.2.4: The platform "linux" is incompatible with this module.                                                                                                                                        
info "fsevents@1.2.4" 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?

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.

Related