react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.41k stars 905 forks source link

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

Closed TMisiukiewicz closed 2 months ago

TMisiukiewicz commented 2 months ago

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

cortinico commented 2 months ago

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

Can you elaborate on this?

szymonrybczak commented 2 months ago

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. https://github.com/react-native-community/cli/issues/2467, https://github.com/react-native-community/cli/issues/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!