You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
init newproject --template modifying react-native.config.js causes error and yarn isn't used by default #2213
Hey, that's really strange, but anyway we deleted creating react-native.config.js in #2203, so starting with 0.73.1 this issue shouldn't exist anymore.
Also, yarn isn't used by default as document stated. It can be reproduced without --template
Can you confirm that yarn --version correctly returns a version of Yarn in the directory that you want to create project?
So probably some tool changed that env variable in your setup and that's why packages are installed with npm right now.
I'm going to update docs to reflect current change. Btw you can also pass --pm yarn to force Yarn usage.
Before 0.73, yarn is the default package manager. So, it's going to be fixed or it just works as intended? Is there a "changing npm_config_user_agent to yarn" guide?
Activity
szymonrybczak commentedon Dec 18, 2023
Hey, that's really strange, but anyway we deleted creating
react-native.config.jsin #2203, so starting with 0.73.1 this issue shouldn't exist anymore.Can you confirm that
yarn --versioncorrectly returns a version of Yarn in the directory that you want to create project?pnthach95 commentedon Dec 18, 2023
Hi @szymonrybczak, I recorded reproducible video about yarn issue
Screen.Recording.2023-12-18.at.7.13.59.PM.mov
yarn v1.22.21 with react-native@0.73.1 just released
szymonrybczak commentedon Dec 18, 2023
@pnthach95 okay, I looked into the code and actually in the first place we're looking for
npm_config_user_agent, and then we have fallback to Yarn 😅cli/packages/cli/src/commands/init/init.ts
Lines 331 to 347 in 2fc5965
So probably some tool changed that env variable in your setup and that's why packages are installed with npm right now.
I'm going to update docs to reflect current change. Btw you can also pass
--pm yarnto force Yarn usage.pnthach95 commentedon Dec 19, 2023
Before 0.73, yarn is the default package manager. So, it's going to be fixed or it just works as intended? Is there a "changing
npm_config_user_agenttoyarn" guide?