【发布时间】:2017-09-21 17:20:48
【问题描述】:
主要错误
“找不到任何与“2.7.1”匹配的“react-native-background-geolocation-android”版本”
环境
- 操作系统:macOS Sierra 10.12.5
- 节点:6.11.0
- 纱线:1.0.2
- npm: 5.3.0
- 守望者:4.9.0
- Xcode:版本 8.3.3 (8E3004b)
复制步骤
我试图在我现有的项目之一中添加 react-native-tab-view 库。所以我做了:
yarn add react-native-tab-view
在我的项目目录中。
预期行为
该库应该安装/添加到我的项目中。
实际行为
它抛出了一个意外错误:
yarn add react-native-tab-view
yarn add v1.0.2
info No lockfile found.
[1/4] ???? Resolving packages...
warning polyline@0.2.0: This module is now under the @mapboxnamespace: install instead
warning connect@2.30.2: connect 2.x series is deprecated
warning node-uuid@1.4.7: Use uuid module instead
Couldn't find any versions for "react-native-background-geolocation-android" that matches "2.7.1"
? Please choose a version of "react-native-background-geolocation-android" from
this list: (Use arrow keys)
❯ 0.0.1-security
进一步
如果我继续选择“0.0.1-security”,安装时会出错。
获取完整的错误日志:click here
Package.json 文件:
{
"name": "MyAppName",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"build": "babel js/ -d lib/",
"prepublish": "npm run build",
"flow": "node_modules/.bin/flow",
"flow start": "flow start",
"flow stop": "flow stop",
"flow status": "flow status",
"flow coverage": "flow coverage"
},
"dependencies": {
"async": "^2.2.0",
"polyline": "^0.2.0",
"pusher-js": "4.1.0",
"react": "15.4.2",
"react-native": "0.42.3",
"react-native-animatable": "^1.1.1",
"react-native-appsee": "^2.3.32",
"react-native-background-geolocation-android": "2.7.1",
"react-native-checkbox": "^1.1.0",
"react-native-code-push": "^1.17.3-beta",
"react-native-device-info": "^0.10.1",
"react-native-fabric": "^0.4.1",
"react-native-file-transfer-android": "0.0.2",
"react-native-image-picker": "^0.26.2",
"react-native-maps": "^0.13.1",
"react-native-message-composer": "^1.0.0",
"react-native-newrelic": "^1.0.18",
"react-native-progress": "^3.2.0",
"react-native-push-notification": "^3.0.0",
"react-native-radio-buttons": "^0.14.0",
"react-native-router-flux": "^3.38.0",
"react-native-slack-webhook": "0.0.5",
"react-native-slider": "^0.9.1",
"react-native-sms-x": "^1.0.4",
"react-native-sound": "^0.9.1",
"react-native-tab-view": "^0.0.69",
"react-native-uploader": "0.0.10",
"react-redux": "^5.0.3",
"react-timer-mixin": "^0.13.3",
"redux": "^3.6.0",
"redux-logger": "^2.10.2",
"redux-persist": "^4.5.0",
"redux-thunk": "^2.2.0",
"socket.io": "^1.7.3"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-jest": "19.0.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-react-native": "1.9.1",
"babel-register": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-react-native": "^2.3.2",
"flow-bin": "^0.37.0",
"install": "^0.10.1",
"jest": "19.0.2",
"npm": "^4.6.1",
"react-test-renderer": "15.4.2"
},
"jest": {
"preset": "react-native"
}
}
【问题讨论】:
-
你能添加你的
package.json文件吗 -
@bennygenel 现已添加。
标签: javascript reactjs react-native