-
Notifications
You must be signed in to change notification settings - Fork 199
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: Error when creating a package. Error in step Copying template
…
#383
Conversation
Thanks for the PR! Although forcing the CLI to use @satya164 WDTY? |
Another solution is to add a flag which disables yarn. People who facing this issue can use this flag until it is not resolved inside the CLI. |
It's important to note that Yarn is required in the default template. There are scripts, CI etc. that uses Yarn. So adding a flag to disable Yarn for creating project doesn't help much when users will need to use it after creating the project anyway. Maybe we should detect and throw an error if Yarn isn't installed. |
Though I also don't understand this - if it cannot be reproduced when Yarn is installed, what difference does |
@satya164 the problem happens when the user has a newer version of yarn like Forcing cli to use npm if a newer version of yarn is installed might fix the issue. So maybe we can add a function to check the yarn version and if it's newer than a certain version, we can force cli init to use npm. |
@atlj gotcha. i was confused because the PR description says that it can't be reproduced when yarn is installed. i don't mind using We can internally use an workaround but it probably makes more sense to fix it in CLI instead. But if it'll take too long or is too complicated, we can use I wouldn't conditionally use Yarn or npm to generate the project since more branches means more surface for bugs. If we always use npm we can easily notice if anything breaks. |
@satya164 I've just checked the PR and no |
packages/create-react-native-library/src/utils/generateExampleApp.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the linting issue
Could you release the new version? |
Solves #382
Summary
Fixes #382 according to react-native issue
Test plan
#382 won't reproduce with yarn installed.