Git Product home page Git Product logo

Comments (4)

szymonrybczak avatar szymonrybczak commented on May 25, 2024

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?

from cli.

pnthach95 avatar pnthach95 commented on May 25, 2024

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 [email protected] just released

from cli.

szymonrybczak avatar szymonrybczak commented on May 25, 2024

@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 😅

function userAgentPackageManager() {
const userAgent = process.env.npm_config_user_agent;
if (userAgent) {
if (userAgent.startsWith('yarn')) {
return 'yarn';
}
if (userAgent.startsWith('npm')) {
return 'npm';
}
if (userAgent.startsWith('bun')) {
return 'bun';
}
}
return null;
}

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.

from cli.

pnthach95 avatar pnthach95 commented on May 25, 2024

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?

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.