ReferenceError: 属性 ‘Buffer’ 不存在,js 引擎: hermes

huangapple go评论55阅读模式
英文:

ReferenceError: Property 'Buffer' doesn't exist, js engine: hermes

问题

升级从Expo SDK 47到Expo SDK 48后,我可以成功构建Android和iOS,但每当我尝试启动iOS应用程序时,我会收到以下错误:

ReferenceError: 属性 'Buffer' 不存在,js引擎: hermes

我无法找出问题所在。我已经在Stack Overflow和其他多个网站上查找过,但似乎找不到答案。

这是我的package.json中的所有内容:

英文:

After upgrading from Expo SDK 47 to Expo SDK 48, I'm getting Android and iOS to build successfully, but whenever I try to pull up the iOS app, I get this error:

ReferenceError: Property 'Buffer' doesn't exist, js engine: hermes

And I cannot figure out what the problem is. I've looked it up on stack overflow and on multiple different sites and can't seem to find an answer for it.

Here's everything in my package.json

{
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo-google-fonts/nunito": "^0.2.0",
    "@expo/dev-server": "^0.2.2",
    "@expo/vector-icons": "^13.0.0",
    "@native-html/table-plugin": "^5.3.1",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/netinfo": "9.3.7",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/elements": "^1.2.1",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@react-navigation/stack": "^6.0.11",
    "@types/react-native-loading-spinner-overlay": "^0.5.3",
    "@types/redux-logger": "^3.0.9",
    "@types/styled-components-react-native": "^5.1.3",
    "axios": "^0.24.0",
    "axios-hooks": "^3.0.0",
    "expo": "~48.0.18",
    "expo-apple-authentication": "~6.0.1",
    "expo-application": "~5.1.1",
    "expo-auth-session": "~4.0.3",
    "expo-clipboard": "~4.1.2",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-in-app-purchases": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-notifications": "~0.18.1",
    "expo-random": "~13.1.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "~1.4.2",
    "expo-store-review": "~6.2.1",
    "expo-tracking-transparency": "~3.0.1",
    "expo-updates": "~0.16.4",
    "formik": "^2.2.9",
    "install": "^0.13.0",
    "laravel-echo": "^1.11.3",
    "moment": "^2.29.4",
    "moment-timezone": "^0.5.34",
    "moti": "^0.17.1",
    "pusher-js": "^7.0.6",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.8",
    "react-native-autolink": "^4.0.0",
    "react-native-chart-kit": "^6.12.0",
    "react-native-device-info": "^8.7.0",
    "react-native-draggable-dynamic-flatlist": "^1.0.4",
    "react-native-draggable-flatlist": "^3.0.5",
    "react-native-elements": "^3.4.2",
    "react-native-fbsdk-next": "^11.1.0",
    "react-native-flash-message": "^0.4.1",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keyboard-aware-view": "^0.0.14",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-modal": "13.0.1",
    "react-native-modalize": "^2.0.13",
    "react-native-pager-view": "6.1.2",
    "react-native-paper": "^4.11.1",
    "react-native-pulse": "^1.0.7",
    "react-native-purchases": "^5.5.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-select-dropdown": "^1.7.0",
    "react-native-svg": "13.4.0",
    "react-native-swipeable-item": "^2.0.8",
    "react-native-tab-view": "^3.1.1",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.26.0",
    "react-redux": "^7.2.6",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1",
    "socket.io-client": "^4.4.1",
    "styled-components": "^5.3.3",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@types/react": "~18.0.24",
    "@types/react-native": "~0.70.6",
    "@types/react-redux": "^7.1.21",
    "typescript": "^4.6.3"
  },
  "resolutions": {
    "@types/react": "18.0.24",
    "@types/react-dom": "18.0.11"
  },
  "private": true,
  "version": "1.0.0"
}

答案1

得分: 1

只需更新 "pusher-js": "^7.0.6""pusher-js": ^8.2.0 即可。

英文:

Just figured out the issue. Had to update "pusher-js": "^7.0.6" to "pusher-js": ^8.2.0

huangapple
  • 本文由 发表于 2023年7月14日 04:54:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76683174.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定