CRA not using yarn
See original GitHub issueDescribe the bug
When creating a new app with CRA, CRA is not using yarn, but NPM.
(Write your answer here.)
Did you try recovering your dependencies?
(Write your answer here.)
No because this is related when creating a new CRA app.
Which terms did you search for in User Guide?
I didn’t search in User Guide because formerly this behaviour wasn’t here.
(Write your answer here if relevant.)
Environment
(paste the output of the command here.)
Environment Info:
current version of create-react-app: 5.0.0
running from /home/k.fernando/.config/yarn/global/node_modules/create-react-app
System:
OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - /usr/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
- WSL2
Steps to reproduce
(Write your steps here:)
- Use the last version of CRA
- If you have yarn, then create a new project with CRA
- Normally, CRA should use yarn instead of NPM, but in this bug, CRA is using NPM
Expected behavior
(Write what you thought would happen.)
Should use yarn.
Actual behavior
(Write what happened. Please add screenshots!)
Using NPM.
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why is yarn create react-app command not working
In you /home/flovet-stack/ folder, run ls -a | grep -E 'yarn|package' command. If you see there are a few folders and files such...
Read more >create-react-app | Yarn - Package Manager
User Guide – How to develop apps bootstrapped with Create React App. ... Inside any created project that has not been ejected, run:...
Read more >Getting Started - Create React App
When you create a new app, the CLI will use npm or Yarn to install dependencies, depending on which tool you use to...
Read more >CRA and Yarn Workspace - Medium
It takes a lot of time to set up since CRA does not support well with Yarn Workspace. Therefore, I wanted to set...
Read more >What Does Create-React-App Actually Do? | by Andrew Mc
Some do not know exactly everything that comes with it, ... Next inside create-react-app (CRA), your command runs through a series of checks....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@germanamz see https://github.com/facebook/create-react-app/issues/11778#issuecomment-996488034 - from my point of view it is as intended. (yes potentially a breaking change, why it was released as part of v5)
If installing globally on the system I don’t think theres a safe way of detecting the intent when creating a new project to use either yarn or npm - therefor npm will be used as default. (@lukekarrys please correct me if I’m wrong) (global npm install of packages are generally not recommended)
I’ll close the issue - let me know if you if
yarn create react-app
doesn’t produce a yarn based project or ifnpx create-react-app
doesn’t produce a npm based project.So is there any options we can use? @lukekarrys @raix or is this a bug?