I am creating a mobile game using react-native and expo. Everything was going well.
The game was going smoothly, I was able to create an apk and an app bundle. But then from no where I could not get it started in the terminal using npx expo start
.
I also tried downloading the app/game inside my android phone and I could not open it.
I am trying to publish it to the google play store(which I now know to be tiresome).
I’ve been getting this error for more over than 2 weeks now and I cannot fix it.
` ERROR Error: URL.protocol is not implemented, js engine: hermes
ERROR Invariant Violation: “main” has not been registered. This can happen if:
- Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
- A module failed to load due to an error and
AppRegistry.registerComponent
wasn’t called., js engine: hermes`
I really need to deploy this app to the Google play store or just get it going on my mobile from the download.
Any Ideas to get it back up and going?
P.S this is my index.js –
import { AppRegistry } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
console.log(appName);
if (!global.HermesInternal) {
require('url-polyfill');
}
AppRegistry.registerComponent(appName, () => App);
I’ve tried running it using npx react-native
start and npx expo start
in the terminal. Neither have worked.
Also I have tried creating the project from scratch still the error is back maybe it’s an internal problem. I have no clue.
P.S I have ran expo and react-native doctor those method also did nothing.
Ralph is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.