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

feat(yarn): prefer local react-native insteda of global one using npx #875

Closed
wants to merge 1 commit into from

Conversation

sibelius
Copy link
Member

@sibelius sibelius commented Dec 3, 2019

Summary:

run local react-native cli version, so it does not have some kind of mismatch of react-native version

Test Plan:

Run against a monorepo using yarn workspaces without nohoist option

@sibelius
Copy link
Member Author

sibelius commented Dec 3, 2019

before this fix the error was like this one

A problem occurred evaluating script.
> React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
  [root:/app/packages/app/android, reactNativePath:/app/node_modules/react-native, dependencies:[:], commands:[], assets:[], platforms:[:], haste:[providesModuleNodeModules:[], platforms:[]], project:[:]]

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

We can't do that. Not every project uses yarn. We may try having some kind of feature detection, but we wanted to avoid that. That's why we use globally available npx, but it seems to have issues in some environments. We would like to first understand why npx fails

@sibelius
Copy link
Member Author

sibelius commented Dec 3, 2019

can we use npm start react-native config ?

@thymikee
Copy link
Member

thymikee commented Dec 3, 2019

No, we can't. "start" usually (and likely not always, as projects differ) runs metro and won't work with extra "config" argument. Can you share a repro where the problem happens so we can investigate?

@sibelius
Copy link
Member Author

sibelius commented Dec 3, 2019

like this https://github.com/entria/entria-fullstack

but we need to remove nohoist on that

@sibelius
Copy link
Member Author

sibelius commented Dec 4, 2019

worked well here https://github.com/entria/entria-fullstack with npx

gonna need more time to figure it out why our internal repo is failing

I'm gonna reopen if I figure it out

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