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
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?
Thanks!
The text was updated successfully, but these errors were encountered:
gaearon
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
Jan 8, 2018
I'd be happy to take a PR that lets you pass something like create-react-app --pm=npm or create-react-app --pm=pnpm and it will use that manager.
gaearon
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
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.
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:
When using
yarn
, if the registryregistry.yarnpkg.com
cannot be reached withdns.lookup
, thenyarn
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 andnpm
is used instead. But I need to usenpm
andyarn
both and I can't uninstallyarn
. 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!
The text was updated successfully, but these errors were encountered: