Closed ericwlange closed 5 years ago
In Config.js:
Config.js
try { fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/node-haste/Package.js', fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js')) ); } catch (e) {} fs.writeFileSync(local_path + 'metro/src/node-haste/Package.js', fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js')) );
and
try { fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/defaults.js', fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js')) ); } catch (e) { fs.writeFileSync(local_path + 'metro/src/defaults.js', fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js')) ); }
handle the catch blocks differently. They should both be like the first.
catch
In
Config.js
:and
handle the
catch
blocks differently. They should both be like the first.