Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

iOS fails to run on apps generated using 12.5.0 #86

Open
joemckie opened this issue Jul 17, 2021 · 2 comments
Open

iOS fails to run on apps generated using 12.5.0 #86

joemckie opened this issue Jul 17, 2021 · 2 comments

Comments

@joemckie
Copy link

joemckie commented Jul 17, 2021

There is an issue with the latest version of this package (which is using a release candidate version of react-native) which causes run-ios to fail with the following error:

/Users/xxx/www/sandbox/nx-react-native-test/node_modules/metro-hermes-compiler/src/emhermesc.js:77
          throw ex;
          ^

RuntimeError: abort(TypeError: Cannot read property 'toUpperCase' of undefined). Build with -s ASSERTIONS=1 for more info.
    at process.abort (/Users/xxx/www/sandbox/nx-react-native-test/node_modules/metro-hermes-compiler/src/emhermesc.js:440:13)
    at process.emit (events.js:375:28)
    at processPromiseRejections (internal/process/promises.js:245:33)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)

I managed to fix this by installing the previous version (12.3.6) and generating the app using that. Bumping the version up to 12.5.0 afterwards causes no issues.

I'm not entirely sure what is causing this issue (although I imagine it might be the version of react-native), but thought I'd raise this issue and offer a solution as it was a struggle getting this to work out of the box.

@joemckie
Copy link
Author

TLDR for people looking for a quick fix: Generate your app using 12.3.6. You can bump the version afterwards if you like.

@joemckie joemckie changed the title iOS fails to run on the latest version iOS fails to run on apps generated using 12.5.0 Jul 17, 2021
@xiongemi
Copy link
Collaborator

are you using yarn?
you might need to add in package.json:

"resolutions": {
    "metro": "0.66.0"
  }

basically, @react-native-community/cli has dependency of metro “^0.66.0”, which installs 0.66.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants