android - npm 安装时 react 导航错误

标签 android node.js react-native react-navigation

我正在尝试使用 React 导航创建一个新的 React Native 应用程序。

我做了以下事情:

1.) create-react-native-app myAppName

2.) cd myAppName/

3.) npm install --save react-navigation

4.) 期待成功安装 react-navigation 但我却得到:

C:\Users\Maima\Documents\GitHub\React\test>npm install --save react-navigation
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\jest.cmd as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\t
est\node_modules\jest
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\jest as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\test\
node_modules\jest
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\rimraf.cmd as it wasn't installed by C:\Users\Maima\Documents\GitHub\React
\test\node_modules\rimraf
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\rimraf as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\tes
t\node_modules\rimraf
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\uuid.cmd as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\t
est\node_modules\uuid
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\uuid as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\test\
node_modules\uuid
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\semver.cmd as it wasn't installed by C:\Users\Maima\Documents\GitHub\React
\test\node_modules\semver
npm WARN rm not removing C:\Users\Maima\Documents\GitHub\React\test\node_modules
\.bin\semver as it wasn't installed by C:\Users\Maima\Documents\GitHub\React\tes
t\node_modules\semver
npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN react-navigation@1.0.0-beta.23 requires a peer of react@* but none is i
nstalled. You must install peer dependencies yourself.
npm WARN react-navigation@1.0.0-beta.23 requires a peer of react-native@* but no
ne is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view@0.0.74 requires a peer of react@* but none is ins
talled. You must install peer dependencies yourself.
npm WARN react-native-tab-view@0.0.74 requires a peer of react-native@* but none
 is installed. You must install peer dependencies yourself.
npm WARN react-native-drawer-layout-polyfill@1.3.2 requires a peer of react-nati
ve@* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-drawer-layout@1.3.2 requires a peer of react@* but none is
 installed. You must install peer dependencies yourself.
npm WARN react-native-drawer-layout@1.3.2 requires a peer of react-native@* but
none is installed. You must install peer dependencies yourself.

+ react-navigation@1.0.0-beta.23
added 8 packages, removed 973 packages and updated 20 packages in 259.667s

请帮助,无法 npm 启动我的 React Native 应用程序。

最佳答案

可以通过再次运行npm install 命令并重新安装npm install --save react-navigation 命令来解决。

关于android - npm 安装时 react 导航错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48215374/

相关文章:

android - 尝试从不同的类实现方法

android - Roboguice 应用程序 @InjectView

javascript - Aurelia 应用程序 "Hello World"根本不工作

c++ - 使用 N-API 将数据流式传输到 Node.js C++ 插件

android - react-native run-android DeviceException 无法创建 ADB 桥

android - 如何在 Android Studio 中放置 watch (查看如何修改变量)?

android - Unity Android IL2CPP 构建成功但未生成Apk

javascript - jade to pug migration => 无法读取函数调用中未定义的属性 'every'

ios - React Native 选择器值在选择时重置

react-native run-android 在扫描文件夹时挂起