反应本机错误fsevents@1.2.4(node_modules \ fsevents

时间:2018-07-19 15:46:25

标签: reactjs react-native expo

您好,我在安装react native-naviation组件后收到这些错误 我正在使用EXPO代替NVD。更重要的是解决粗体警告(最后两个警告)

npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN native-base@2.7.2 requires a peer of react@>=16.4.1 but none is installed. You must install peer dependencies yourself.

npm WARN native-base@2.7.2 requires a peer of react-native@>=0.56.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-maps@0.21.0 requires a peer of react-native@^0.51 || ^0.52 || ^0.53 || ^0.54 but none is installed. You must install peer dependencies yourself.

npm WARN react-native-reanimated@1.0.0-alpha.3 requires a peer of react@16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.

npm WARN react-native-reanimated@1.0.0-alpha.3 requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.

**npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):**

**npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})**

1 个答案:

答案 0 :(得分:0)

这些错误都不是要担心的。实际上,它们不是错误,而是警告。

eslint代码质量检查软件。它只是检查您的代码以查看其是否遵循最佳标准。您可以根据需要关闭该警告。

fsevents是可选的依赖项。如果在Mac系统上使用npm,通常会出现此错误。但是它对您的构建没有影响。如果您对最后两个错误特别不满意,请运行npm i -f来强制获取远程资源(这应该摆脱该依赖性问题)。