Upgrade React Native From 0.71 To 0.72
Jul 24, 2023
Pay attention for your settings.gradle file. You need to change the react-native-gradle-plugin/package.json to @react-native/gradle-plugin/package.json. And this is very important. :)
As for metro.config.js:
const { getDefaultConfig } = require('@expo/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
module.exports = (async () => {
defaultConfig.resolver.sourceExts.push('cjs');
defaultConfig.resolver.sourceExts.push('mjs');
return defaultConfig;
})();
That will work.