我有问题将React Native App从Expo sdk 21升级到Expo sdk 26 .
我已按照以下步骤操作:
1)在app.json中,将sdkVersion更改为“26.0.0”2)在package.json中,更改这些依赖项:
-
react-native to“https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz”
-
世博会"^26.0.0"
-
作出反应("16.3.0-alpha.1" - 此确切版本)
-
react-navigation to "1.5.8"
以前,我使用的是:
-
expo ^ 21.0.2
-
react-navigation ^ 1.0.0-beta.21“
-
react ": " ^ 16.0.0-alpha.12“,
-
react-native ": " ^ 0.48.4“
现在我得到这个错误,我不知道从哪里开始搜索或调试..任何想法?
这是完全依赖:
"dependencies": {
"@expo/vector-icons": "^5.2.0",
"expo": "^21.0.2",
"install": "^0.10.1",
"moment": "^2.19.1",
"moment-timezone": "^0.5.14",
"native-base": "^2.3.2",
"npm": "^5.4.2",
"prop-types": "^15.6.0",
"react": "^16.0.0-alpha.12",
"react-native": "^0.48.4",
"react-native-communications": "^2.2.1",
"react-native-directed-scrollview": "^1.3.0",
"react-native-inputs": "^0.2.1",
"react-native-keyboard-aware-scroll-view": "^0.4.1",
"react-native-lazyload-components": "^1.0.1",
"react-native-maps": "^0.16.4",
"react-native-material-design-searchbar": "^1.1.7",
"react-native-material-dropdown": "^0.6.0",
"react-native-material-textfield": "^0.10.2",
"react-native-rest-client": "^0.1.1",
"react-native-root-toast": "^2.2.0",
"react-native-snackbar-component": "^1.0.8",
"react-native-textinput-effects": "^0.4.1",
"react-navigation": "^1.0.0-beta.21",
"react-navigation-redux-debouncer": "^0.0.2",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
}
关于我如何获得线路,图书馆或者造成这种冲突的东西的任何想法?
亲切的问候
1 回答
好吧,这个错误很难调试,但问题是我的代码中存在循环依赖 .
"Super expression must either be null or a function.."
消息是一种ES6 babel方式,告诉您导入/循环依赖项中存在错误 .因此,在解决了很多工作要做之后,正如@Michael Cheng所说,很多库确实在SDK21和SDK26之间做了很多改变 .