React Native 安装Hermes引擎(0.71.2)时卡住

jqjz2hbq  于 2023-02-13  发布在  React
关注(0)|答案(1)|浏览(482)

我已经创建了一个新的react原生项目,然后安装npm,运行命令bundle install,然后cd iOS pod install,但它卡住了

Installing React-perflogger (0.71.2)
Installing React-runtimeexecutor (0.71.2)
Installing ReactCommon (0.71.2)
Installing SocketRocket (0.6.0)
Installing TOCropViewController (2.6.1)
Installing Yoga (1.14.0)
Installing YogaKit (1.18.1)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Installing hermes-engine (0.71.2)

这是我的package.json文件

{
  "name": "ApproverApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.16.1",
    "@react-navigation/bottom-tabs": "^6.2.0",
    "@react-navigation/drawer": "^6.5.5",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.5.0",
    "@reduxjs/toolkit": "^1.8.0",
    "axios": "^0.26.1",
    "css-to-react-native": "^3.0.0",
    "lodash": "^4.17.21",
    "mime": "^3.0.0",
    "moment": "^2.29.1",
    "native-base": "^3.3.7",
    "react": "18.2.0",
    "react-native": "0.71.2",
    "react-native-calendars": "^1.1279.0",
    "react-native-date-picker": "^4.2.0",
    "react-native-dialog": "^9.2.1",
    "react-native-document-picker": "^8.0.0",
    "react-native-gesture-handler": "^2.3.0",
    "react-native-image-crop-picker": "^0.37.3",
    "react-native-modal": "^13.0.1",
    "react-native-permissions": "^3.3.1",
    "react-native-popup-menu": "^0.15.12",
    "react-native-reanimated": "^2.4.1",
    "react-native-responsive-fontsize": "^0.5.1",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^4.1.2",
    "react-native-screens": "^3.13.1",
    "react-native-size-matters": "^0.4.0",
    "react-native-svg": "^12.3.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-vector-icons": "^9.1.0",
    "react-redux": "^7.2.6",
    "redux": "^4.1.2",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.73.7",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  }
}
flvlnr44

flvlnr441#

我已经设法按照这篇评论中的说明修复了这个问题。
所以基本上你要做的是:
1.安装Gemfile.ruby-version中列出的Ruby版本。您可以使用http://rbenv.org/https://rvm.io/安装和使用.ruby-version文件中的版本。以下是rbenv的说明
1.使用bundle install安装正确版本的CocoaPods
1.使用bundle exec pod repo update更新CocoaPods存储库
1.通过cd安装pod-进入ios文件夹cd ios,然后运行bundle exec pod install

相关问题