Skip to content

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

@merryta
No description provided.

Activity

  1. chuchude commented on Dec 21, 2021

    @chuchude

    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?

  2. maximarsoficial commented on Dec 21, 2021

    @maximarsoficial

    Hello, I just came across this problem, and I found that with this I could solve it

    npx create-react-app@latest {project name}

  3. maximarsoficial commented on Dec 21, 2021

    @maximarsoficial

    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 me

  4. chuchude commented on Dec 21, 2021

    @chuchude

    Thank you. I just fixed it by running npm install -g create-react-app@5.0.0

  5. MrEmanuel commented on Dec 22, 2021

    @MrEmanuel

    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 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-app
    
    

    This 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-cache

  6. cristiano-belloni commented on Dec 22, 2021

    @cristiano-belloni

    @MrEmanuel, the problem is that

    npm uninstall -g create-react-app

    does 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 App message that gives the title to this ticket.

  7. bchilcott commented on Dec 23, 2021

    @bchilcott

    So this is what happens when running npx create-react-app as 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.

  8. ttran134 commented on Dec 23, 2021

    @ttran134

    I have encountered this issue last week and my take is npm_config_yes=true create-react-app my-app@latest

  9. strongmove commented on Dec 23, 2021

    @strongmove

    npx clear-npx-cache worked for me.

  10. MrEmanuel commented on Dec 23, 2021

    @MrEmanuel

    I updated my answer to include the command do clear the cache as per the comment from @strongmove

  11. MuhammedMustafaKhan commented on Dec 27, 2021

    @MuhammedMustafaKhan

    @chuchude Thank you

    Her is the solution => Thank you. I just fixed it by running npm install -g create-react-app@5.0.0

  12. Disha1998 commented on Dec 27, 2021

    @Disha1998

    Thank you ..! Cant you please let me know that how to ren the project ?

    --> I tried " react-scripts start " this but cant run the program. :(

  13. tanselberkant commented on Dec 27, 2021

    @tanselberkant

    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 👍 ❤

  14. nadlgit commented on Dec 27, 2021

    @nadlgit

    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

  15. YousefAlsbaihi commented on Dec 28, 2021

    @YousefAlsbaihi

    just run

    Uninstall create-react-app by running this code in your terminal

    npm uninstall -g create-react-app

    After uninstall done, install it again
    npm install -g create-react-app

    to test
    npx create-react-app app-name

  16. 41 remaining items

  17. testacode commented on Apr 25, 2022

    @testacode

    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@12

    and then in the index.js from 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')
    );
  18. forkonlyone commented on Apr 26, 2022

    @forkonlyone

    #11816 (comment)

    this woring from my problem, thanks bro 🔥🔥🔥

  19. gugol2 commented on Apr 27, 2022

    @gugol2

    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.3

    This 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>

  20. Ahmed546 commented on Apr 30, 2022

    @Ahmed546

    I tried everything then use these commands
    npm uninstall -g create-react-app
    then
    npm install -g create-react-app and it works for me.

  21. TimmyDDthe1st commented on May 4, 2022

    @TimmyDDthe1st

    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 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-app
    

    This 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-cache

    This fixed it for me!

  22. Rallanvila commented on Jun 14, 2022

    @Rallanvila

    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!

  23. pastinepolenta commented on Jun 15, 2022

    @pastinepolenta

    Even npx create-react-app --scripts-version 4.0.3 does 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 Node
    

    I currently don't have a way to run CRA version 4 with node 12

  24. alobban commented on Jun 22, 2022

    @alobban

    Even npx create-react-app --scripts-version 4.0.3 does 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 Node
    

    I 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.

  25. alexn-s commented on Jul 3, 2022

    @alexn-s

    just encountered this issue
    npx clear-npx-cache & uninstalling globally does not work for me.

    npx create-react-app@5.0.1 ... worked for me

  26. RLWB commented on Jul 25, 2022

    @RLWB

    If npm uninstall -g create-react-app not working; please use yarn global remove create-react-app worked for me.

  27. to commented on Oct 12, 2022

    @to

    npm install create-react-app@4.0.3

    edit createReactApp.js around checkForLatestVersion()(line:204) and run

    node ./node_modules/create-react-app/index.js <project-name>

  28. AbdessamieAbdellah commented on Oct 16, 2022

    @AbdessamieAbdellah

    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.

  29. HaoCherHong commented on Nov 14, 2022

    @HaoCherHong

    took me a while to understand:
    If you're trying to run CRA with v4.0.3 configs, you should instead install the latest CRA by

    npm install create-react-app@latest
    

    and run following:

     npx create-react-app <app-name> --scripts-version 4.0.3
    
  30. junihoj commented on Jan 19, 2023

    @junihoj

    just use
    npx create-react-app@latest <project name>
    I guess this is the best way to go.

  31. Dee4kin commented on May 31, 2023

    @Dee4kin

    Я исправил эту проблему, изменив версию 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-app
    

    Good job bro! Thats worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions