Repository navigation
You are running create-react-app 4.0.3, which is behind the latest release (5.0.0). We no longer support global installation of Create React Ap #11816
Description
Activity
I encountered the same issue. I have tried almost everything. uninstall, clear cache, and use npx create-react-app@5.0.0 but still not working. but the yarn does work. Can anyone help?
Reacted by Aaron Carver, Viktor Bogutskii, tiber2013, Dhrumil23, Ali, Ben Higginbotham, 流浪大法师, akash raj, Björn Biege, wctiger and 6 moreHello, I just came across this problem, and I found that with this I could solve it
npx create-react-app@latest {project name}
Reacted by Helios Aliaga, Cristiano Belloni, Gogi H., Thupi Ceylons, oyooyo, Henry, Akina Ohira, masuibass, Shishir, aoriekhov-godaddy and 630 moreReacted by Aaron Carver, David, Josh Wedekind, Paul Bennett, Djak, 流浪大法师, Moritz Frölich, ExcitedDeveloper, Jonathan Zayan, Bennekrouf and 7 moreReacted by Oliver Abreu, 2the2ndpower, rykercu, elie-atia, AchrefFast, Joel B. H. Greenberg, Dylson Oliveira, Paul Bennett, Benjamin J Darago, Saul Rojas and 22 moreReacted by Nadine, Jake Snyder, Matt Smith, Khristian Adesina, strider1212, dominictobias, Michaela McKanna, 流浪大法师, Arslan Iftikhar, Danny and 63 moreReacted by Arslan Iftikhar, uzairkhan-12, Adnan Ahmad, Dinos Theodorou, Amber Nash, Oliver Abreu, JordanTPhysics, coffeeintocode, 2the2ndpower, Edwin Henriquez and 102 moreReacted by halfrussian , 流浪大法师, Arslan Iftikhar, CoderZ90, Danny, Michael Holmes, Decker Strom, JordanTPhysics, Clark Winters, 2the2ndpower and 47 moreReacted by Arslan Iftikhar, rykercu, Paul Bennett, Benjamin J Darago, Matteo DE VITA, Erfang Chen, 流浪大法师, Leonardo, KrisDecame, mekcherie and 4 moreAlso what one can do is enter the console as administrator, located in the user's folder, and put this command (in my case I used the NPM one)
npm uninstall -g create-react-app
we uninstall it and then I reinstall it
npm install -g create-react-appand voila, it worked for me
Reacted by iordanka911, Chawanzi Ng'uni, Andrew Garrison, Sebastian Lukic, Sofanit Tesfaye, sai Kishore , 流浪大法师, Geeth Gunnampalli, aurelieCissokho, Akanksha Singh and 165 moreReacted by Jake Snyder, dominictobias, 流浪大法师, Aaron Carver, John Theodorakopoulos, Oscar Cornejo Aguila, Ez-21, Chanuga Jayathilaka, Frank Panetta, Daniel T and 10 moreReacted by Didier Cruz, shandamengcheng, 流浪大法师, VladZimin, eleluong, Tadej Hiti, გიორგი ენუქიძე, BadrKarim, Steven Choi and Daniel BellmasReacted by enrike000, Omer Magdy, Angeldealba12, shandamengcheng, César Wapler, Amir G, Karla Mora, 流浪大法师, VladZimin, Ruben Chirino and 8 moreReacted by Jerson Morrow, shandamengcheng, 流浪大法师, Eduardo Pedra de Oliveira, KrisDecame, VladZimin, გიორგი ენუქიძე, BadrKarim and Steven ChoiThank you. I just fixed it by running
npm install -g create-react-app@5.0.0Reacted by Muhammad Mustafa, Akina Ohira, Kayla Kantola, Bryson M, Pavlo Serhiichuk, bransonex, Jerome Amos, Cindy, 流浪大法师, giedreb and 66 moreReacted by Jake Snyder, Marko Antolić, dominictobias, 流浪大法师, Aaron Carver, John Theodorakopoulos, Frank Panetta, Sean Amarasinghe, Stephan Nielsen, Azrarag Mohamed and 5 moreReacted by Muhammad Mustafa, 流浪大法师, Vijay Sandhu, Jesse De Lira and Tae Hyung KimReacted by Muhammad Mustafa, 流浪大法师, Jesse De Lira, World_magics and Tae Hyung KimReacted by Maximiliano Mercado Diaz, Wenhan Yang, Muhammad Mustafa, bransonex, talha.exe, Peeradech, 流浪大法师, Vincent Genouel, Charlotte Sides, MaximilianHansen and 11 moreReacted by Muhammad Mustafa, annemwangi, Kayla Kantola, bransonex, 流浪大法师, Viktor Bogutskii, Jesse De Lira and David EmanuelReacted by Muhammad Mustafa, 流浪大法师, Jesse De Lira, Fabian Riedlsperger, Ivan, Riya Sailesh and Ehsan ShafieeAlso what one can do is enter the console as administrator, located in the user's folder, and put this command (in my case I used the NPM one)
npm uninstall -g create-react-app
we uninstall it and then I reinstall it npm install -g create-react-app
and voila, it worked for me
I would advice against installing npm packages globally. Thus I would recommended that you instead do:
npm uninstall -g create-react-app npx clear-npx-cache npx create-react-app my-appThis is the preferred installation method according to the react docs.
https://reactjs.org/docs/create-a-new-react-app.htmlnpx is included in newer versions of npm and you shouldn't need to install it.
Read more about npx here: https://www.npmjs.com/package/npxEdit: Thanks to @strongmove for suggesting to add
npx clear-npx-cacheReacted by Аскаров Вадим, Ashish Bajaj, Mithun Kamath, Dan Card, zxy, Mohamed Atheel, Josep Viciana, John, Oleksandr Onda, Mohammad hossein rasoulian and 345 moreReacted by Sherief Elsowiny, Cárcamo, kevinL5, Viktoriia Maksymovych, Valentin Baca, Lisandro Martinez, Ben Major, lovebuizel, Adithya Krishnan, Angelo and 8 moreReacted by Josep Viciana, Tanvir Ahmed, Álvaro Medina Ballester, uffe hellum, Marko Antolić, Shailendra Paliwal, Armaan Somani, Steven Failla, G-R3, 流浪大法师 and 76 moreReacted by Ashish Bajaj, Disha Sathavara, Mohamed EL Moumny, Álvaro Medina Ballester, uffe hellum, Marko Antolić, Anurag Dash, Shailendra Paliwal, Armaan Somani, Steven Failla and 53 more@MrEmanuel, the problem is that
npm uninstall -g create-react-appdoes not solve the
You are running create-react-app 4.0.3, which is behind the latest release (5.0.0). We no longer support global installation of Create React Appmessage that gives the title to this ticket.Reacted by Jake Snyder, 流浪大法师, novwhisky, rkaufman13, Nick Zanetti, Nimish Telang, Ka Mok, Hitesh Nair, albert, Will Smith and 19 moreSo this is what happens when running
npx create-react-appas recommended, even after uninstalling globally.PS C:\Repos> npx create-react-app my-app Need to install the following packages: create-react-app Ok to proceed? (y) y You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0). We no longer support global installation of Create React App. Please remove any global installs with one of the following commands: - npm uninstall -g create-react-app - yarn global remove create-react-app The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/ PS C:\Repos>The solution as mentioned above is to just use
npx create-react-app@latest, but it's definitely a strange problem. I'm using a fresh installation of node and npm here. I'm running on Windows through PowerShell.Reacted by Jake Snyder, 流浪大法师, Jake Steck, rokit, Stefan Balan, Juan Carlos Mellizo, LouisMaupas, Druvis Cukurs, Brian Demorcy, Sam Ho and 2 moreI have encountered this issue last week and my take is
npm_config_yes=true create-react-app my-app@latestnpx clear-npx-cache worked for me.
Reacted by Cristiano Belloni, Emanuel Lindström, ttran134, oyooyo, Mithun Kamath, Oluwatimileyin Ojo, Stan Gogan, K-Nizamov, Josep Viciana, Adam Hirzalla and 100 moreReacted by Aaron Carver, Ka Mok, Seth Holland, Manoel Neto, 流浪大法师, ExcitedDeveloper, Justin Larison and Flávio LemesReacted by Allan Saywitz, 0x930, 流浪大法师, Le Thi Thuy Hang, Sebastien Hecart, Kelvin Castro and Luigi MannoniI updated my answer to include the command do clear the cache as per the comment from @strongmove
Reacted by Rick Gladwin@chuchude Thank you
Her is the solution => Thank you. I just fixed it by running npm install -g create-react-app@5.0.0
Reacted by Roopali Singh, 流浪大法师 and RisyandiThank you ..! Cant you please let me know that how to ren the project ?
--> I tried " react-scripts start " this but cant run the program. :(
Hello, I just came across this problem, and I found that with this I could solve it
npx create-react-app@latest {project name}
it works thanks 👍 ❤
Hello, I just came across this problem, and I found that with this I could solve it
npx create-react-app@latest {project name}
Thank you so much
just run
Uninstall create-react-app by running this code in your terminal
npm uninstall -g create-react-appAfter uninstall done, install it again
npm install -g create-react-appto test
npx create-react-app app-nameReacted by Cristiano Belloni, Marko Antolić, Ben Chilcott, 流浪大法师, Aaron Carver, John Theodorakopoulos, Joel Tan, JSIV, Devin Kearns, albert and 17 more41 remaining items
My solution was just installing latest and downgrading react version in the app.
1 -
npx create-react-app@latest <app-name>
2 -npm install react@17 react-dom@17 @testing-library/react@12 @testing-library/user-event@12and then in the
index.jsfrom the root directory:import ReactDOM from 'react-dom/client'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> );
to
import ReactDOM from 'react-dom'; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') );
this woring from my problem, thanks bro 🔥🔥🔥
Ok. So how do we use version 4.0.3 though? We cannot switch to Node 14 for... reasons.
update
If you want to run the previous version,
npx create-react-app --scripts-version 4.0.3This answer was awesome!
And just for the sake of making it super easy (and if you want typescript in your project):
npx create-react-app --scripts-version 5.0.0 --template typescript <your-project-name>Reacted by Ihor RomanchukI tried everything then use these commands
npm uninstall -g create-react-app
then
npm install -g create-react-app and it works for me.Also what one can do is enter the console as administrator, located in the user's folder, and put this command (in my case I used the NPM one)
npm uninstall -g create-react-app
we uninstall it and then I reinstall it npm install -g create-react-app
and voila, it worked for meI would advice against installing npm packages globally. Thus I would recommended that you instead do:
npm uninstall -g create-react-app npx clear-npx-cache npx create-react-app my-appThis is the preferred installation method according to the react docs. https://reactjs.org/docs/create-a-new-react-app.html
npx is included in newer versions of npm and you shouldn't need to install it. Read more about npx here: https://www.npmjs.com/package/npx
Edit: Thanks to @strongmove for suggesting to add
npx clear-npx-cacheThis fixed it for me!
Hello, I just came across this problem, and I found that with this I could solve it
npx create-react-app@latest {project name}
This worked perfectly for me!
Even
npx create-react-app --scripts-version 4.0.3does not work for me. I get:You are running Node 12.13.0. Create React App requires Node 14 or higher. Please update your version of NodeI currently don't have a way to run CRA version 4 with node 12
Even
npx create-react-app --scripts-version 4.0.3does not work for me. I get:You are running Node 12.13.0. Create React App requires Node 14 or higher. Please update your version of NodeI currently don't have a way to run CRA version 4 with node 12
I am running Node 16.15.0 and still no joy. So upgrading wouldn't help.
just encountered this issue
npx clear-npx-cache& uninstalling globally does not work for me.npx create-react-app@5.0.1 ...worked for meIf
npm uninstall -g create-react-appnot working; please useyarn global remove create-react-appworked for me.npm install create-react-app@4.0.3edit createReactApp.js around checkForLatestVersion()(line:204) and run
node ./node_modules/create-react-app/index.js <project-name>Hello, I just came across this problem, and I found that with this I could solve it
npx create-react-app@latest {project name}
It worked for me too. Thanks a lot.
took me a while to understand:
If you're trying to run CRA withv4.0.3configs, you should instead install the latest CRA bynpm install create-react-app@latestand run following:
npx create-react-app <app-name> --scripts-version 4.0.3just use
npx create-react-app@latest <project name>
I guess this is the best way to go.Я исправил эту проблему, изменив версию
npmустановленной16.11.1версии. Только что измененнаяnvmверсия14.18.1> node -v v16.11.1 > nvm use 14 Now using node v14.18.1 (npm v6.14.15) > npx create-react-app my-appGood job bro! Thats worked for me!
Reacted by Muhamed Alibegovic