【问题标题】:Installation issue in: 'react-native-tab-view'安装问题:'react-native-tab-view'
【发布时间】: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

屏幕截图 1:

进一步

如果我继续选择“0.0.1-security”,安装时会出错。

屏幕截图 2:

获取完整的错误日志: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


【解决方案1】:

您是否将react-native-background-geolocation-android 的版本明确选择为2.7.1

该库上没有版本号为 2.7.1 的版本。如果将其更改为2.7.0 或更新版本的库,然后运行命令yarn add react-native-tab-view,它将被安装。

你可以找到react-native-background-geolocation-androidhere的版本号

【讨论】:

  • 我更新将 package.json 文件中的版本更改为“2.9.3”(最新)和“2.7.0”。两次我都遇到了同样的问题:找不到与“2.9.3”匹配的“react-native-background-geolocation-android”的任何版本?请从此列表中选择“react-native-background-geolocation-android”的版本:❯ 0.0.1-security
  • 能否尝试删除node_modules文件夹并锁定文件并尝试进行全新安装
猜你喜欢
  • 2019-10-16
  • 2022-01-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-07-02
  • 1970-01-01
  • 2023-01-04
相关资源
最近更新 更多