首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >React本机: worker.js中意料之外的令牌朋c;;,预期的朋克

React本机: worker.js中意料之外的令牌朋c;;,预期的朋克
EN

Stack Overflow用户
提问于 2022-08-29 12:55:02
回答 1查看 150关注 0票数 0

我在我的项目中添加了一个新的包“react本机-appflyer”:"^6.8.0“。不幸的是,当我试图捆绑我的本机iOS时,会出现以下错误:

代码语言:javascript
复制
> error
> app/views/LoggedIn/WorkoutFeedbackView/WorkoutFeedbackStep1View.tsx:
> Unexpected token punc «;», expected punc «,» in file
> app/views/LoggedIn/WorkoutFeedbackView/WorkoutFeedbackStep1View.tsx at
> 208:27. Run CLI with --verbose flag for more details. Error:
> Unexpected token punc «;», expected punc «,» in file
> app/views/LoggedIn/WorkoutFeedbackView/WorkoutFeedbackStep1View.tsx at
> 208:27
>     at /Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:430:17
>     at Generator.next (<anonymous>)
>     at asyncGeneratorStep (/Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:75:24)
>     at _next (/Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:95:9)
>     at /Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:100:7
>     at new Promise (<anonymous>)
>     at /Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:92:12
>     at JsTransformer._minifyCode (/Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:437:7)
>     at /Users/niklasbraun/Documents/GitHub/heapster/SkillYoga/mobile-app/node_modules/metro/src/JSTransformer/worker.js:367:33

我已经试过更新、反应和反应文件WorkoutFeedbackStep1View.tsx也没有208个行。

同样,this question的答案也不起作用。

我的package.json看起来是这样的:

代码语言:javascript
复制
    "@invertase/react-native-apple-authentication": "^2.1.0",
    "@notifee/react-native": "^0.15.2",
    "@react-native-async-storage/async-storage": "^1.15.0",
    "@react-native-community/datetimepicker": "^3.0.9",
    "@react-native-community/netinfo": "^5.9.10",
    "@react-native-community/slider": "^3.0.3",
    "@react-native-firebase/analytics": "^10.5.1",
    "@react-native-firebase/app": "^10.5.0",
    "@react-native-firebase/crashlytics": "^10.5.1",
    "@react-native-firebase/in-app-messaging": "^10.5.1",
    "@react-native-firebase/messaging": "^10.5.1",
    "@react-native-firebase/remote-config": "^10.5.1",
    "@react-native-picker/picker": "^1.9.10",
    "amazon-cognito-identity-js": "^4.5.7",
    "aws-amplify": "^3.3.14",
    "email-validator": "^2.0.4",
    "hex-to-rgba": "^2.0.1",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.20",
    "lottie-ios": "3.1.8",
    "lottie-react-native": "^4.0.2",
    "m3u8-parser": "^4.5.0",
    "metro-config": "^0.64.0",
    "moment": "^2.29.1",
    "prop-types": "^15.7.2",
    "react": "16.13.1",
    "react-content-loader": "^5.1.4",
    "react-native": "0.63.4",
    "react-native-adapty": "^1.3.13",
    "react-native-adjust": "^4.29.4",
    "react-native-appsflyer": "^6.8.0",
    "react-native-cache": "^2.0.1",
    "react-native-circular-progress": "^1.3.7",
    "react-native-config": "^1.4.2",
    "react-native-device-info": "^8.0.1",
    "react-native-elements": "^3.2.0",
    "react-native-exception-handler": "^2.10.9",
    "react-native-fbsdk": "^3.0.0",
    "react-native-fs": "^2.17.0",
    "react-native-gesture-handler": "^1.9.0",
    "react-native-hyperlink": "0.0.19",
    "react-native-iap": "^6.2.0",
    "react-native-image-crop-picker": "^0.36.0",
    "react-native-image-marker": "^0.6.1",
    "react-native-keep-awake": "^4.0.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^2.0.2",
    "react-native-modal": "^12.0.0",
    "react-native-navigation": "^7.22.3",
    "react-native-offline": "^5.8.0",
    "react-native-orientation-locker": "^1.2.0",
    "react-native-permissions": "^3.0.1",
    "react-native-rate": "^1.2.4",
    "react-native-safe-area": "^0.5.1",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-share": "^6.2.0",
    "react-native-simple-crypto": "^0.2.15",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-splash-screen": "^3.2.0",
    "react-native-svg": "^12.1.0",
    "react-native-url-polyfill": "^1.2.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-version-check": "^3.4.2",
    "react-native-video": "^5.1.1",
    "react-native-webview": "^11.2.3",
    "react-redux": "^7.2.2",
    "redux": "^4.0.5",
    "redux-actions": "^2.6.5",
    "redux-devtools-extension": "^2.13.9",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "remote-redux-devtools": "^0.5.16",
    "rollbar-react-native": "^0.9.1",
    "semver": "^5.7.0",
    "uuid": "^3.4.0",
    "victory-native": "^35.3.1"
  },
  "devDependencies": {
    "@babel/core": "^7.13.1",
    "@babel/runtime": "^7.13.7",
    "@types/jest": "^26.0.20",
    "@types/lodash": "^4.14.168",
    "@types/react": "^17.0.2",
    "@types/react-native": "^0.63.50",
    "@types/react-native-fbsdk": "^3.0.0",
    "@types/react-native-keep-awake": "^2.0.2",
    "@types/react-native-share": "^3.3.1",
    "@types/react-native-snap-carousel": "^3.8.2",
    "@types/react-native-video": "^5.0.4",
    "@types/react-redux": "^7.1.16",
    "@types/react-test-renderer": "^17.0.1",
    "@types/redux-logger": "^3.0.8",
    "@types/remote-redux-devtools": "^0.5.4",
    "@types/uuid": "^8.3.0",
    "@typescript-eslint/eslint-plugin": "^4.15.2",
    "@typescript-eslint/parser": "^4.15.2",
    "babel-eslint": "^10.1.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "colors": "^1.4.0",
    "eslint": "^7.20.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.22.0",
    "eslint-plugin-react-hooks": "^4.2.0",
    "graceful-fs": "^4.2.6",
    "jetifier": "^1.6.6",
    "metro-react-native-babel-preset": "^0.66.0",
    "npm-run-all": "^4.1.5",
    "prompts": "^2.4.0",
    "react-dom": "^16.9.0",
    "react-native-schemes-manager": "^2.0.0",
    "typescript": "^4.2.2"
  },
EN

回答 1

Stack Overflow用户

发布于 2022-09-23 12:34:31

因此,当我尝试多种解决方案时,唯一对我起作用的是更新、反应和反应--本地包,错误就消失了。

问题是与react本机<0.64.0不兼容的react本机appsflyer包的冲突。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73529124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档