I’m trying to upgrade to sdk 31 and having trouble getting babel properly upgraded.
I have "@babel/core": "^7.0.0-0",
in my devDependencies, though I’ve tried without that as well.
The issue is when I run jest, I get the error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3".
npm list | grep -v deduped | grep babel/core
shows @babel/core@7.2.2
.
But, package-lock.json
has "babel-core": {"version": "6.26.3" ...}
.
I’ve tried reinstalling node modules, deleting package-lock.json, nothing helps.
This seems like a more general npm issue and not exactly expo related, but hopefully someone here can help?
I’ve solved it now, somehow. Unfortunately I don’t know what exactly I changed. In case it helps anyone, relevant parts from my working package.json:
"devDependencies": {
"@types/jest": "^23.3.9",
"@types/react": "^16.7.4",
"@types/react-native": "^0.57.8",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-preset-expo": "^5.0.0",
"jest": "^23.6.0",
"jest-expo": "^31.0.0",
"react-native-testing-library": "^1.3.0",
"react-native-typescript-transformer": "^1.2.10",
"ts-jest": "^23.10.4",
"tslint": "^5.11.0",
"typescript": "^3.1.6"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"test": "node_modules/.bin/jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^31.0.6",
"expo-cli": "^2.6.11",
"lodash": "^4.17.11",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz",
"react-native-button": "^2.3.0",
"react-native-keyboard-aware-scroll-view": "^0.4.0",
"sentry-expo": "~1.11.0"
},
This was mostly copied from https://github.com/akveo/akveo-react-native-boilerplate
system
Closed
January 4, 2019, 2:07am
3
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.