-
Notifications
You must be signed in to change notification settings - Fork 39
Description
After following the steps in the guide, I had this error:
`/MyApp/node_modules/react-native-codegen/lib/parsers/flow/index.js:220
const regex = new RegExp(TURBO_MODULE_REGISTRY_REQUIRE_REGEX_STRING, 'g');
^
SyntaxError: Invalid regular expression: /TurboModuleRegistry\s*.\sget(Enforcing)?\s<\sSpec\s>\s*(\s*'"['"]\s*,?\s*)/: Invalid group
Command PhaseScriptExecution failed with a nonzero exit code`
I found a solution, by following this advice facebook/react-native#31180
I added
"resolutions": { "react-native-codegen": "^0.0.7" },
to my package.json, deleted package-lock.json, rm -rf ./node_modules/react-native-codegen, then used yarn to install, which honors resolutions, installing only versions of packages as specified. This got around an issue react-native-codegen 0.0.6 has, which is imported by some other libraries