我遇到了将React Native App从Expo sdk 21升级到Expo sdk 26的问题。
我已按照以下步骤操作:
1)在app.json中,将sdkVersion更改为" 26.0.0" 2)在package.json中,更改这些依赖项:
以前,我正在使用:
现在我得到这个错误,我不知道从哪里开始搜索或调试..任何想法?
这是完整的依赖项:
"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"
}
关于我如何获得线路,图书馆或其他导致此冲突的想法?
亲切的问候
答案 0 :(得分:0)
嗯,错误有点难以调试,但问题是我的代码中存在循环依赖。
"Super expression must either be null or a function.."
消息是一种ES6 babel方式,告诉您导入/循环依赖项中存在错误。
因此,在解决了很多工作要做之后,正如@Michael Cheng所说,很多图书馆都在破坏SDK21和SDK26之间的变化。