Migration React Native from 0.63 to 0.65 Troubleshooting Guide

Lee young-jun
2 min readMay 8, 2023

--

A few month ago, we upgraded Kickgoing’s version of react-native from 0.63 to 0.65.
Actually this project was caused by Xcode 13 long time ago. I couldn’t run ‘react-native run-ios’ after upgrading Xcode to 13.

To solve this problem, I had to upgrade react-native-cli to version 6. However react-native cli 6.0 requires minimum RN 0.65.
In this article, I will share you how to solve the problems I encountered.

NativeEventEmitter is not a constructor

jest.mock(‘react-native/Libraries/EventEmitter/NativeEventEmitter’)

Unknown node type TSInstantiationExpression

remove yarn.lock

unexpected token ndkVersion

ndkVersion = "21.4.7075529"

wrap with “”

Transform’s input file does not exist react-native-reanimated-65-hermes.aar

upgrade reac-native-reanimated to 2.8.0

require.requireActual is not a function

jest.requireActual(‘react’)

cannot be used as a JSX component

package.json

"resolutions": {
...,
"@types/react": "17.0.2"
},

Type ‘{ retries: … }’ has no properties in common with type ‘Options’

package.json

"dependencies": {
...,
"async-retry": "1.3.3",
},
...
"devDependencies": {
...,
"@types/async-retry": "1.4.5",
}

CocoaPods could not find compatible versions for pod ‘FBSDKShareKit’

Remove Podfile.lock

portability/Time.h… Typedef redefinition with different types

Podfile

case target.name
when 'RCT-Folly'
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end

EventEmitter.removeListener(‘didUpdateDimensions’, …): Method has been deprecated

package.json

"react-native-modal": "13.0.0",

‘NMapsMap/NMGLatLng.h’ file not found

Podfile

pod 'NMapsMap', '~>3.15.0'

RNGestureHandlerManager.h expected a type

package.json

"react-native-gesture-handler": "2.8.0",

remove createReactActivityDelegate() from mainactivity.java

Flipper-Folly RCT-Folly duplicate Folly.a

An SSL Error has occured

Info.plist

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
...
<key>NSExceptionMinimumTLSVersion</key>
<string></string>

EventEmitter.removeListener(‘change’ has been deprecated

Keyboard.addListener(KeyboardEventNames.didShow, keyboardDidAppear)

Keyboard.removeListener(KeyboardEventNames.didShow, keyboardDidAppear)

const keyboardDidShowListener = useRef<EmitterSubscription | null>(null)

keyboardDidShowListener.current = Keyboard.addListener(
KeyboardEventNames.didShow,
keyboardDidAppear
)

keyboardDidShowListener.current?.remove()

It is impossible to close drawer(side menu) by tapping a dimmed background

AppRegistry.registerComponent('...', () => App);

AppRegistry.registerComponent('...', () => gestureHandlerRootHOC(App));

--

--

No responses yet