TakumaH
@TakumaH (Takuma Hosokai)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

[React Native] Unhandled JS Exception: Unexpected keyword 'export' no stack

解決したいこと

react nativeアプリがbuildはされるがアプリ内容が全く表示されない問題を解決したいです。

git cloneをしてきて、そのルートディレクトリで、npx react-native run-iosコマンドを実行し、無事アプリのbuildには成功しているのですが、下の画像のようなエラーが出て、画面は一向に表示されません。

色々な記事を参考にしてみたのですが、この情報がかなり少なく手の打ちようがなくなってしまいました。
解決策を知ってらっしゃる方がおりましたら、ぜひご回答よろしくお願いします。

発生している問題・エラー

Unhandled JS Exception: Unexpected keyword 'export'

no stack

実行環境

  • Mac OS BigSur version 11.6.2
  • node version 16.8.0
  • npx react-native --version >> 5.0.1
package.json
{
  "name": "Hoge",
  "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 ."
  },
  "dependencies": {
    "@aws-amplify/core": "^4.1.1",
    "@aws-amplify/pushnotification": "^4.3.12",
    "@react-native-async-storage/async-storage": "^1.15.5",
    "@react-native-community/datetimepicker": "^3.5.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-community/progress-bar-android": "^1.0.4",
    "@react-native-community/progress-view": "^1.3.1",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-community/slider": "^3.0.3",
    "@react-navigation/bottom-tabs": "^5.11.10",
    "@react-navigation/material-top-tabs": "^5.3.15",
    "@react-navigation/native": "^5.3.15",
    "@react-navigation/stack": "^5.3.15",
    "@typescript-eslint/eslint-plugin": "^4.33.0",
    "@typescript-eslint/parser": "^4.33.0",
    "amazon-cognito-identity-js": "^5.0.3",
    "aws-amplify": "^4.3.15",
    "aws-amplify-react-native": "^5.0.2",
    "aws-sdk": "^2.1104.0",
    "axios": "^0.26.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-jest": "^24.7.0",
    "eslint-plugin-prettier": "^4.0.0",
    "install": "^0.13.0",
    "lottie-ios": "^3.2.3",
    "lottie-react-native": "^4.0.3",
    "native-base": "^2.15.2",
    "npm": "^7.24.1",
    "react": "17.0.1",
    "react-native": "0.64.1",
    "react-native-animated-loader": "^0.0.9",
    "react-native-aws-ivs-player-view": "^0.2.8",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^8.5.0",
    "react-native-draggable-flatlist": "^2.6.2",
    "react-native-dropdown-picker": "^5.1.15",
    "react-native-elements": "^3.4.1",
    "react-native-fs": "^2.19.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-inappbrowser-reborn": "^3.5.1",
    "react-native-intersection-observer": "^0.0.8",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-media-controls": "^2.3.0",
    "react-native-modal": "^11.10.0",
    "react-native-modal-datetime-picker": "^9.2.3",
    "react-native-pager-view": "^5.4.15",
    "react-native-paper": "^4.11.2",
    "react-native-pdf": "^6.2.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "^2.2.0",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-screens": "^3.1.1",
    "react-native-slider": "^0.11.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-splash-screen": "^3.2.0",
    "react-native-swipe-cards": "^0.1.1",
    "react-native-swipe-gestures": "^1.0.5",
    "react-native-tab-view": "^3.1.1",
    "react-native-vector-icons": "^8.1.0",
    "react-native-video": "^5.1.1",
    "rn-fetch-blob": "^0.12.0",
    "sudo": "^1.0.3",
    "url": "^0.11.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/preset-env": "^7.16.11",
    "@babel/preset-flow": "^7.16.7",
    "@babel/preset-react": "^7.16.7",
    "@babel/runtime": "^7.12.5",
    "@bam.tech/react-native-make": "^3.0.3",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/react-native-vector-icons": "^6.4.6",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-react": "^7.29.4",
    "jest": "^26.6.3",
    "jetifier": "^2.0.0",
    "metro-react-native-babel-preset": "^0.64.0",
    "prettier": "^2.6.1",
    "react-test-renderer": "17.0.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

Simulator Screen Shot - iPhone 12 - 2022-04-06 at 13.45.04.png

0

No Answers yet.

Your answer might help someone💌