Skip to content

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

Merged
thymikee merged 2 commits into
react-native-community:mainfrom
TMisiukiewicz:chore/init-with-npm-by-default
Sep 23, 2024
Merged

chore: set npm as default package manager to init#2503
thymikee merged 2 commits into
react-native-community:mainfrom
TMisiukiewicz:chore/init-with-npm-by-default

Conversation

@TMisiukiewicz

Copy link
Copy Markdown
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-actionsgithub-actionsBot added docs Documentation change infra Internal work not facing public APIs labels Sep 13, 2024
@TMisiukiewiczTMisiukiewicz changed the title chore: set npm as default package manager to initrefactor: set npm as default package manager to initSep 13, 2024
@TMisiukiewiczTMisiukiewicz added command: init and removed infra Internal work not facing public APIs labels Sep 13, 2024
@TMisiukiewiczTMisiukiewicz changed the title refactor: set npm as default package manager to initchore: set npm as default package manager to initSep 13, 2024

@thymikeethymikee left a comment

Copy link
Copy Markdown
Member

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

@szymonrybczakszymonrybczak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@cortinico

Copy link
Copy Markdown
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
Copy Markdown
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:mainSep 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command: initdocsDocumentation change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@TMisiukiewicz@cortinico@szymonrybczak@thymikee