我无法安装组件,因为我收到此错误:
npm install react-native-side-menu
Rdemo@0.0.1 /home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo
+-- UNMET PEER DEPENDENCY react@16.0.0-alpha.6
`-- react-native-side-menu@0.20.1
npm WARN react-native-selectbox@0.1.2 requires a peer of react@>15.0 but none was installed.
npm WARN react-static-container@1.0.1 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
我正在尝试在我的反应原生演示中实现侧边菜单。我是这个平台的新手和自学者。我在这个演示中使用 react-native-router-flux 架构。
我从下面的链接中获得了侧面菜单实施的示例:-
我尝试了以下命令来消除此错误,但没有成功:-
npm install npm@latest -g
npm prune
npm install --save react@16.0.0-alpha.6
反应本机版本信息:-
react-native-cli: 2.0.1
react-native: 0.44.0
这是我的 Package.json :-
{
"name": "Rdemo",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "^16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-check-box": "^1.0.4",
"react-native-drawer": "^2.3.0",
"react-native-easy-toast": "^1.0.6",
"react-native-flexi-radio-button": "^0.2.0",
"react-native-router-flux": "^3.38.0",
"react-native-selectbox": "^0.1.2",
"react-native-vector-icons": "^4.1.1",
"react-native-web-service-handler": "^1.0.2"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.3",
"react-test-renderer": "16.0.0-alpha.6"
},
"jest": {
"preset": "react-native"
}
}
npm 详细信息:-
npm list --depth=0
Rdemo@0.0.1 /home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo
+-- babel-jest@20.0.3
+-- babel-preset-react-native@1.9.2
+-- jest@20.0.3
+-- UNMET PEER DEPENDENCY react@16.0.0-alpha.6
+-- react-native@0.44.0
+-- react-native-check-box@1.0.4
+-- react-native-drawer@2.3.0
+-- react-native-easy-toast@1.0.6
+-- react-native-flexi-radio-button@0.2.0
+-- react-native-router-flux@3.39.2
+-- react-native-selectbox@0.1.2
+-- react-native-vector-icons@4.2.0
+-- react-native-web-service-handler@1.0.2
`-- react-test-renderer@16.0.0-alpha.6
npm ERR! peer dep missing: react@>15.0, required by react-native-selectbox@0.1.2
npm ERR! peer dep missing: react@^0.13.0 || ^0.14.0 || ^15.0.0, required by react-static-container@1.0.1
Node version :- v6.9.1
npm version :- v3.10.8
这是我的错误的屏幕截图:-
任何帮助,谢谢