1 delete node_module
2 delete yarn.lock or pakage.jason.lock
3 rm -rf /tmp/metro-*
4 add this in to metro.config.js
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
sourceExts: ['jsx', 'js', 'ts', 'tsx', "cjs"], //add here
},
};
5 yarn install