Difficulty updating to SDK 31 from SDK 27.

Hi folks,
I’m trying to update an older project from SDK 27.0.0 and it was going well until I made the jump from 30 to 31.

I keep getting the error:
node_modules\react-native-scripts\build\bin\crna-entry.js: Cannot find module ‘babel-preset-expo’

I’ve tried the fix here:Upgrade to Expo 31/Babel 7? - #7 by matteo-pennisi

But the error I get then is: read property ‘1’ of undefined

Does anyone have any suggestions to bridge the gap?

As of now app.json looks like this:
{
“expo”: {
“name”: “SafePlan”,
“icon”: “./Media/Images/SafePlanIcon.png”,
“version”: “1.1”,
“slug”: “safeplan”,
“sdkVersion”: “31.0.0”,
“packagerOpts”: {
“assetExts”: [“db”]
},
“orientation”: “portrait”,
“splash”: {
“image”: “./Media/Images/SafePlanSplash.png”,
“resizeMode”: “cover”
},
“ios”: {
“bundleIdentifier”: “com.nuig.safeplan”,
“usesIcloudStorage”: true
},
“android”: {
“package”: “com.nuig.safeplan”
}
}
}

and package.json:
“devDependencies”: {
“babel-plugin-transform-remove-console”: “^6.9.4”,
“jest-expo”: “~27.0.0”,
“react-native-scripts”: “1.14.0”,
“react-test-renderer”: “16.3.1”
},
“main”: “./node_modules/react-native-scripts/build/bin/crna-entry.js”,
“scripts”: {
“start”: “react-native-scripts start”,
“eject”: “react-native-scripts eject”,
“android”: “react-native-scripts android”,
“ios”: “react-native-scripts ios”,
“test”: “jest”
},
“jest”: {
“preset”: “jest-expo”
},
“dependencies”: {
@expo/vector-icons”: “^6.3.1”,
@haskkor/react-native-pincode”: “^1.5.4”,
“expo”: “^31.0.0”,
“moment”: “^2.22.2”,
“native-base”: “^2.6.1”,
“prop-types”: “^15.6.1”,
“react”: “16.5.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz”,
“react-native-accordion”: “^1.0.1”,
“react-native-calendars”: “^1.19.3”,
“react-native-chart-kit”: “^1.1.5”,
“react-native-collapsible”: “^0.12.0”,
“react-native-communications”: “^2.2.1”,
“react-native-dialog”: “^5.4.0”,
“react-native-elements”: “^0.19.1”,
“react-native-elevated-view”: “0.0.6”,
“react-native-image-view”: “^2.1.1”,
“react-native-image-zoom-viewer”: “^2.2.13”,
“react-native-input-scroll-view”: “^1.7.1”,
“react-native-keyboard-aware-scroll-view”: “^0.6.0”,
“react-native-keyboard-spacer”: “^0.4.1”,
“react-native-modal-datetime-picker”: “^6.0.0”,
“react-native-modal-selector”: “0.0.28”,
“react-native-multiple-select-list”: “^1.0.4”,
“react-native-open-maps”: “^0.3.1”,
“react-native-picker-select”: “^4.4.0”,
“react-native-pin-code”: “^0.4.1”,
“react-native-scalable-image”: “^0.4.0”,
“react-native-slider”: “^0.11.0”,
“react-native-snap-carousel”: “^3.7.4”,
“react-native-snap-slider”: “^0.3.0”,
“react-native-swipeable”: “^0.6.0”,
“react-native-vector-icons”: “^4.6.0”,
“react-navigation”: “^2.2.0”,
“react-redux”: “^5.0.7”,
“react-timer-mixin”: “^0.13.4”,
“redux”: “^4.0.0”,
“tcomb-form-native”: “git+https://github.com/conbag/tcomb-form-native.git#app-version”,
“victory-native”: “^30.1.0”
}
}

and .babelrc:

{
“presets”: [“babel-preset-expo”],
“env”: {
“development”: {
“plugins”: [“transform-react-jsx-source”]
},
“production”: {
“plugins”: [“transform-remove-console”]
}
}
}
[Edited for readability]

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.