沉默'info fsevents@1.2.4:平台“ linux”与此模块不兼容。

时间:2018-11-03 08:49:06

标签: yarnpkg

运行yarn check时,我看到:

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说可以安全地忽略该消息。

有没有一种方法可以防止它首先发生?

2 个答案:

答案 0 :(得分:2)

不确定yarn check,但要安装/更新yarn --silent甚至更好的yarn --silent --ignore-optional

yarn --silent安装可选的dep,但没有输出。

注意:如果运行带有--ignore-optional标志,则您可能依赖某些可选依赖项,而没有意识到。因此,我建议在测试项目之前删除node_modules文件夹和yarn.lock文件,然后运行yarn --ignore-optional。如果发现您需要一些可选的dep,则将它们作为[dev] deps [相应地]添加。 尽管如果只是fsevents而从未安装过,那就不用担心。

答案 1 :(得分:0)

当前似乎无法阻止未明确要求的有关可选依赖项的消息。

请参阅以下yarn GitHub问题:

相关问题