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
Add a flag to force create-react-app to use a specific package manager #2809
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
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?
changed the title [-]Is it possible to add a parameter for user to specify installation tool(yarn/npm) dynamically?[/-][+]Add a flag to force create-react-app to use npm[/+]on Jan 8, 2018
changed the title [-]Add a flag to force create-react-app to use npm[/-][+]Add a flag to force create-react-app to use a specific package manager[/+]on Jan 8, 2018
Actually, just realized we already support --use-npm flag. I think this is probably enough for now. It was added in #3409 and hasn't been released yet but we can close this.
Activity
[-]Is it possible to add a parameter for user to specify installation tool(yarn/npm) dynamically?[/-][+]Add a flag to force create-react-app to use npm[/+]gaearon commentedon Jan 8, 2018
I'd be happy to take a PR that lets you pass something like
create-react-app --pm=npmorcreate-react-app --pm=pnpmand it will use that manager.[-]Add a flag to force create-react-app to use npm[/-][+]Add a flag to force create-react-app to use a specific package manager[/+]gaearon commentedon Jan 14, 2018
Actually, just realized we already support
--use-npmflag. I think this is probably enough for now. It was added in #3409 and hasn't been released yet but we can close this.vjpr commentedon Feb 19, 2018
I still think we should allow
--pm=pnpm.Timer commentedon Feb 26, 2018
Feel free to submit a PR @vjpr, I'd be happy to review it.