React Native应用程序在启动第一个应用程序时显示一些错误

时间:2018-04-22 11:43:45

标签: android react-native terminal

我是反应原生的新手。我按照 Facebook react-native website 指导的所有步骤进行了操作。但我在启动 app 时遇到了这些问题。请帮助我如何解决这个问题。它在启动我的第一个应用时会显示一些警告。

错误是:

npm WARN @babel/plugin-transform-parameters@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-spread@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-for-of@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-computed-properties@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-regenerator@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-shorthand-properties@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-template-literals@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-class-properties@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-object-rest-spread@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-flow@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-jsx@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
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 @babel/plugin-transform-sticky-regex@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-unicode-regex@7.0.0-beta.40 requires a peer of @babel/core@7.0.0-beta.40 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.0 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.0: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

1 个答案:

答案 0 :(得分:4)

您可以运行以下命令: npm install @ babel / core @ 7.0.0-beta.40 eslint@^3.17.0 || ^ 4.0.0

如果您缺少任何其他对等方,则可以运行npm install,然后运行缺少的对等依赖项。

在每个对等体之间添加空格。

参考文献: npm install抱怨peer deps。 Github,Inc。 https://github.com/angular/angular/issues/5746(2018年4月22日访问)。