upgrade-support
upgrade-support copied to clipboard
Upgrading Javascript errors 0.66.1->0.78.2
Environment
System: OS: macOS 15.4.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 35.79 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 22.15.0 path: ~/.nvm/versions/node/v22.15.0/bin/node Yarn: version: 1.22.17 path: /usr/local/bin/yarn npm: version: 10.9.2 path: ~/.nvm/versions/node/v22.15.0/bin/npm Watchman: version: 2021.12.06.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.16.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 24.4 - iOS 18.4 - macOS 15.4 - tvOS 18.4 - visionOS 2.4 - watchOS 11.4 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: version: 16.3/16E140 path: /usr/bin/xcodebuild Languages: Java: version: 11.0.13 path: /Users/robertgary/.jenv/shims/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 19.1.0 wanted: 19.1.0 react-native: installed: 0.78.2 wanted: 0.78.2 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: false newArchEnabled: false iOS: hermesEnabled: false newArchEnabled: false
Things I’ve done to figure out my issue
Used chatgpt, etc. I've tried adding flex to my babel.config.js
module.exports = { presets: ['module:metro-react-native-babel-preset','@babel/preset-flow'], };
Upgrading version
0.78.2
Description
react-native start -- --reset-cache
ERROR SyntaxError: /XXXXX/node_modules/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js: Unexpected token, expected "," (16:56) ERROR SyntaxError: /XXXX/lightbringer/node_modules/react-native/Libraries/Components/Button.js: Missing initializer in const declaration. (288:23)
Reproducible demo
react-native start -- --reset-cache
Seems like there must be some trick to override babel to force it to use flex when it looks at react-native. But this seems very difficult
Did you find a fix? @RobertGaryHPE