react-native-cli
Error: `fsevents` unavailable (this watcher can only be used on Darwin)
For me I uninstalled watchman and then reinstalled it using brew as shown below: npm r -g watchman brew install watchman
Cannot read properties of undefined (reading ‘transformFile’) at Bundler.transformFile
Ran into the same issue with Node.js 17.0.0. To solve it, I downgraded to version 14.18.1, deleted node_modules and reinstalled.
Run a React Native iOS release build from terminal
I did a PR to the React Native project to allow this feature. The PR can be check here: https://github.com/facebook/react-native/commit/ca7cbdee858e84c4a74a2d9c7be151f5cfdcfbfe So, in the future, to run a release build from terminal you just only need to type the following command: npx react-native run-ios –configuration Release If you want run your project on a real device … Read more
How to resolve the error on ‘react-native start’
I just got a similar error for the first time today. It appears in \node_modules\metro-config\src\defaults\blacklist.js, there is an invalid regular expression that needed changed. I changed the first expression under sharedBlacklist from: var sharedBlacklist = [ /node_modules[/\\]react[/\\]dist[/\\].*/, /website\/node_modules\/.*/, /heapCapture\/bundle\.js/, /.*\/__tests__\/.*/ ]; to: var sharedBlacklist = [ /node_modules[\/\\]react[\/\\]dist[\/\\].*/, /website\/node_modules\/.*/, /heapCapture\/bundle\.js/, /.*\/__tests__\/.*/ ];
Unable to load script.Make sure you are either running a Metro server or that your bundle ‘index.android.bundle’ is packaged correctly for release
You haven’t started the bundler yet. Run npm start or react-native start in the root directory of your project before react-native run-android.