node_module 中文件的语法错误意外标记,集成 rnmapbox/maps 时应为“,”(4:7)

问题描述 投票:0回答:1

我在 iOS 中通过 repo github 集成了 rnmapbox/maps#main 并且 node_module 有一些错误。 我也通过 that link 在 github 中创建了问题,但是如果有人以前遇到过这个问题。请随时在这里提供帮助。

谢谢

我用模拟器 iphone 14 pro max (iOS 16.1) 运行

react-native run-ios
时显示错误的图像

操作系统:Macbook pro M1 2021
本机反应:0.68.2

SyntaxError with file in node_module Unexpected token, expected

我们的 package.json 在应用程序中使用

{
  "name": "nineten",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "android:jetify": "npx jetify",
    "android:clean": "cd android && ./gradlew clean && cd ..",
    "android:build-release-apk": "cd android && ./gradlew assembleRelease && open app/build/outputs/apk/release"
  },
  "dependencies": {
    "@apollo/client": "^3.7.0",
    "@invertase/react-native-apple-authentication": "^2.1.2",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/datetimepicker": "^3.5.2",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-community/voice": "^1.1.9",
    "@react-native-firebase/app": "^16.4.3",
    "@react-native-firebase/dynamic-links": "^16.4.3",
    "@react-native-google-signin/google-signin": "^8.0.0",
    "@react-native-picker/picker": "^1.16.3",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/stack": "^6.3.1",
    "@reduxjs/toolkit": "^1.8.5",
    "color": "^3.1.3",
    "deprecated-react-native-prop-types": "^2.3.0",
    "graphql": "^16.6.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.1",
    "native-base": "2.15.2",
    "postinstall-postinstall": "^2.1.0",
    "react": "17.0.2",
    "react-native": "0.68.2",
    "react-native-android-location-services-dialog-box": "^2.8.2",
    "react-native-animatable": "^1.3.3",
    "react-native-collapsible": "^1.6.0",
    "react-native-device-info": "^8.0.1",
    "react-native-fast-image": "^8.3.4",
    "react-native-fbsdk-next": "^4.2.0",
    "react-native-floating-label-input": "1.2.8",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-image-picker": "^3.6.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "^0.29.4",
    "react-native-modal": "^11.10.0",
    "react-native-modal-datetime-picker": "^10.0.0",
    "react-native-pager-view": "5.3.4",
    "react-native-payments": "^0.8.4",
    "react-native-permissions": "^3.2.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "^2.10.0",
    "react-native-render-html": "^5.1.0",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^4.4.1",
    "react-native-screens": "^3.17.0",
    "react-native-select-dropdown": "^1.4.0",
    "react-native-size-matters": "^0.4.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-svg": "^12.1.1",
    "react-native-svg-uri": "^1.2.3",
    "react-native-swiper": "^1.6.0-rc.3",
    "react-native-tab-view": "^3.2.1",
    "react-native-text-input-mask": "^3.1.4",
    "react-native-version-check": "^3.4.3",
    "react-native-video": "5.2.1",
    "react-native-video-controls": "^2.8.1",
    "react-native-webview": "10.1.1",
    "react-redux": "^7.2.4",
    "redux": "^4.1.0",
    "rn-fetch-blob": "^0.12.0",
    "rn-placeholder": "^3.0.3",
    "yarn": "^1.22.19"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-eslint": "7.2.3",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "eslint-plugin-flowtype": "2.35.0",
    "eslint-plugin-import": "2.7.0",
    "eslint-plugin-jsx-a11y": "6.0.2",
    "eslint-plugin-prettier": "2.1.2",
    "eslint-plugin-react": "7.1.0",
    "eslint-plugin-react-native": "3.0.1",
    "flow-bin": "0.52.0",
    "flow-typed": "^2.5.1",
    "husky": "0.14.3",
    "jest": "^26.6.3",
    "jetifier": "^1.6.4",
    "metro-react-native-babel-preset": "^0.67.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}

我已经尝试在文档集成 iOS 平台的过程中逐步进行操作。一切都很好,除了运行 ios 时出现问题 https://github.com/rnmapbox/maps/blob/main/ios/install.md

typescript react-native mapbox-gl mapbox-ios react-native-mapbox-gl
1个回答
-1
投票

我也有同样的问题! 有谁知道为什么会这样?

© www.soinside.com 2019 - 2024. All rights reserved.