Skip to content

Add a flag to force create-react-app to use a specific package manager #2809

Closed
@leojiang

Description

@leojiang

Background:

create-react-app uses yarn as the default installation tool if it is found in the environment.
source code: line 195 in createReactApp.js

There're two special situation:

  1. When using yarn, if the registry registry.yarnpkg.com cannot be reached with dns.lookup, then yarn will switch to offline mode and try to use local cache. But I don't have any cached modules at all. Then it goes to a dead end!!
    source code: line 616 in createReactApp.js

  2. Anyway for situation no.1, uninstall yarn can solve the problem and npm is used instead. But I need to use npm and yarn both and I can't uninstall yarn. It goes to a dead end again!!!

So, Is it possible to add a parameter for user to specify which installation tool(yarn/npm) to be used dynamically?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions