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

chore: set npm as default package manager to init #2503

Conversation

TMisiukiewicz
Copy link
Collaborator

Summary:

After discussing it internally, we decided to make npm a default package manager for projects created with init. yarn in version >= 3 generates a lot of issues and makes the first experience with React Native worse.

Test Plan:

  1. Run init command locally
  2. Once the process is complete, verify package-lock.json is in the folder, and there is no yarn.lock file
    Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@github-actions github-actions bot added docs Documentation change infra Internal work not facing public APIs labels Sep 13, 2024
@TMisiukiewicz TMisiukiewicz changed the title chore: set npm as default package manager to init refactor: set npm as default package manager to init Sep 13, 2024
@TMisiukiewicz TMisiukiewicz added command: init and removed infra Internal work not facing public APIs labels Sep 13, 2024
@TMisiukiewicz TMisiukiewicz changed the title refactor: set npm as default package manager to init chore: set npm as default package manager to init Sep 13, 2024
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.

Thanks! Let's hold on with merging for now and keep on discussing when to proceed

Copy link
Collaborator

@szymonrybczak szymonrybczak left a comment

Choose a reason for hiding this comment

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

👍

@cortinico
Copy link
Member

yarn in version >= 3 generates a lot of issues and makes the first experience with React Native worse.

Can you elaborate on this?

@szymonrybczak
Copy link
Collaborator

Can you elaborate on this?

Since we added Yarn v3.x as the default package manager for init we received a bunch of issues internally/externally e.g. #2467, #2468, that we've tried to resolve but with no lack unfortunately. After time the bump to higher Yarn version seems very unstable to us. By moving to npm by default user still have an ability to migrate to Yarn by running two commands in new project, but now it's opt-in and hopefully we'll avoid a bunch of problems. I hope that this makes decision more clear to you!

@thymikee thymikee merged commit 90945e6 into react-native-community:main Sep 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command: init docs Documentation change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants