Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cannot find module remotedev in production environment #335

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

pac-guerreiro
Copy link
Contributor

Details

When building react native onyx for production, node will throw an error saying that it cannot find remotedev module. This is due to the fact that remotedev is a devDependency which is not included in production bundle. To solve this, remotedev needs to be dynamically imported.

Related Issues

Expensify/App#27130 (comment)

Automated Tests

Linked PRs

@pac-guerreiro pac-guerreiro requested a review from a team as a code owner September 11, 2023 11:08
@melvin-bot melvin-bot bot requested review from youssef-lr and removed request for a team September 11, 2023 11:09
@mountiny mountiny self-requested a review September 11, 2023 13:54
@mountiny
Copy link
Contributor

@ospfranco has been testing if the tests are fixed after this PR

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Oscar confirmed this works here Expensify/App#27130 (comment)

@mountiny mountiny merged commit adc3d27 into Expensify:main Sep 11, 2023
3 checks passed
@ospfranco
Copy link
Contributor

Just tested this trying to start the app with metro running and got the same error. Seems on Metro NODE_ENV is indeed set to production.

CleanShot 2023-09-12 at 10 36 36

@pac-guerreiro did you try running the app and not just the tests with your change?

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.

3 participants