Home > Software design >  Huge unsolved problem with npx create-react-app
Huge unsolved problem with npx create-react-app

Time:12-16

I have huge problem when trying to create new react app with npx create-react-app my-app. I have no completely deleted my Node, npm and npx two times and downloaded again and I have checked that my $PATH is usr/local/bin so everything should be okay but every time no matter what I do it says the following:

MarkT@Mark-MacBook-Pro ~ % cd Desktop/ MarkT@Mark-MacBook-Pro Desktop % npx create-react-app my-app Need to install the following packages: create-react-app Ok to proceed? (y)

And after proceeding it says the following:

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/

MarkT@Mark-MacBook-Pro ~ %

After that when I follow instructions and copy the npm uninstall -g create-react-app or yarn global remove create-react-app it starts this all over again and says:

up to date, audited 1 package in 195ms

found 0 vulnerabilities MarkT@Mark-MacBook-Pro ~ % npx create-react-app my-app Need to install the following packages: create-react-app Ok to proceed? (y)

I have searched the whole internet and hasn't found a solution, please I need some experts advice on this one this is killing, am I doing something wrong?!?!

CodePudding user response:

based on your description and so, out of the blue, i would say your current node context is polluted somehow.

as you use *nix system with the macbbook, i would suggest to use nvm to create/have a fresh new, detached and independent from your system nodejs context, to make sure you have no other pollutions

CodePudding user response:

I've got exactly the same problem. This script has worked for me:

npx create-react-app@latest my-app
  • Related