Skip to content

Conversation

subhankarmaiti
Copy link
Contributor

🛠️ Changes

This PR fixes issue #1081 where Expo users were experiencing an error with our config plugin: "Unexpected token 'typeof'" when running expo install react-native-auth0 or expo prebuild.

The root cause is related to how react-native-builder-bob now generates package.json files inside the lib/*/ directories. This breaks Expo's plugin system because the findUpPlugin function (responsible for locating the nearest package.json) stops at the lib/commonjs directory instead of finding our root package.json.

Changes made:

  • Modified the prepare script in package.json to remove the automatically generated package.json files in lib directories:
"prepare": "bob build && rm -rf lib/*/package.json"
  • Updated dependencies to ensure compatibility with the latest versions of react-native-builder-bob
  • Ensured the build process properly formats our plugin output to be compatible with Expo

These changes ensure our library continues to work with Expo projects without requiring users to downgrade to earlier versions.

🔗 References

@subhankarmaiti subhankarmaiti requested a review from a team as a code owner April 30, 2025 09:41
@subhankarmaiti subhankarmaiti merged commit b120465 into master Apr 30, 2025
4 checks passed
@subhankarmaiti subhankarmaiti deleted the fix-expo-51 branch April 30, 2025 10:06
@subhankarmaiti subhankarmaiti mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants