升级到expo SDK 38和expo cli 3.22.3后出现javascriptbundle错误,将node js降级为



我最近从36升级到了最新的expo SDK版本38,并且我遇到了javascript构建错误。我已经用expo upgrade升级了SDK,并通过运行npm install来安装依赖项。感谢您提前提供的帮助。

错误:构建JavaScript捆绑包:错误:node_modules/expo/AppEntry.js:Transformer.transform不是函数

package.json:

{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"lint": "eslint src -c .eslintrc.json --ext js,jsx"
},
"dependencies": {
"@react-navigation/native": "^5.0.0-alpha.22",
"@use-expo/font": "^2.0.0",
"expo": "^38.0.0",
"expo-constants": "~9.1.1",
"expo-contacts": "~8.2.1",
"expo-image-picker": "~8.3.0",
"expo-local-authentication": "~9.1.1",
"expo-notifications": "~0.3.3",
"expo-permissions": "~9.0.1",
"expo-sms": "~8.2.1",
"lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2",
"lodash.orderby": "^4.6.0",
"lottie-react-native": "~2.6.1",
"mem": "^6.0.1",
"moment": "^2.24.0",
"react": "16.11.0",
"react-dom": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-animatable": "^1.3.3",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "~1.6.0",
"react-native-keyboard-accessory": "^0.1.10",
"react-native-modal": "^11.5.3",
"react-native-reanimated": "^1.9.0",
"react-native-screens": "^2.9.0",
"react-native-smooth-pincode-input": "^1.0.9",
"react-native-svg": "^12.1.0",
"react-native-vector-icons": "^7.0.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-stack": "1.10.3",
"react-navigation-tabs": "^2.7.0",
"react-redux": "^7.1.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"babel-preset-expo": "^8.2.3",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-node": "^4.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^1.7.0",
"husky": "^3.1.0",
"metro": "^0.61.0",
"prettier": "^1.19.1"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"private": true
}

app.json:

{
"expo": {
"name": "Wif",
"slug": "wif",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}

我不能100%确定,但我认为这与城域网配置有关
试用此软件包https://www.npmjs.com/package/@expo/metro配置

相关内容

最新更新