Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working after update #10495

Open
dan-ville opened this issue Feb 3, 2021 · 8 comments
Open

Not working after update #10495

dan-ville opened this issue Feb 3, 2021 · 8 comments

Comments

@dan-ville
Copy link

Hi, I get this error whenever I run the command $ npx create-react-app new-app in my terminal, and I follow the instructions to uninstall via npm uninstall -g create-react-app and then try to make a new react app but it simply keeps giving me the same error.

Is this happening for anyone else??

You are running `create-react-app` 4.0.1, which is behind the latest release (4.0.2).

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/

npm ERR! code 1
npm ERR! path /home/dvill/programming/my apps/feeding-miami
npm ERR! command failed
npm ERR! command sh -c create-react-app "new-app"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dvill/.npm/_logs/2021-02-03T19_35_15_972Z-debug.log
@klleroy
Copy link

klleroy commented Feb 3, 2021

I've been encountering this as well today! Works on 14.15.4 but not 15.8.

@TaylorDarneille
Copy link

TaylorDarneille commented Feb 3, 2021

While not super sensible, these are the two different fixes we quickly discovered in the middle of teaching a react lesson in an SE bootcamp today (if npm uninstall -g create-react-app doesn't work):

  1. Literally do the opposite of what the error message says: run npm -g create-react-app and then you can rn npx create-react-app sitename
  2. In a slightly less confusing fix, this also seems to work: npm uninstall -g create-react-app && npm i -g npm@latest && sudo npm cache clean -f

@klleroy
Copy link

klleroy commented Feb 3, 2021

Super helpful. Thanks @TaylorDarneille!

@dan-ville
Copy link
Author

@TaylorDarneille Amazing, thanks!

@trisha
Copy link

trisha commented Feb 4, 2021

While not super sensible, these are the two different fixes we quickly discovered in the middle of teaching a react lesson in an SE bootcamp today (if npm uninstall -g create-react-app doesn't work):

  1. Literally do the opposite of what the error message says: run npm -g create-react-app and then you can rn npx create-react-app sitename
  2. In a slightly less confusing fix, this also seems to work: npm uninstall -g create-react-app && npm i -g npm@latest && sudo npm cache clean -f

Confirming that option 1 oddly worked for me, too!

@peterbe
Copy link

peterbe commented Feb 4, 2021

I still don't want to install create-react-app with yarn or with npm. I encounter the same error with the wonderful npx.

Steps to reproduce

cd /tmp
npx create-react-app cra

(same error as mentioned above)

@Coteh
Copy link

Coteh commented Feb 23, 2021

Just had this happen to me again with 4.0.3 update, and this time cleaning npm cache did not fix it. I needed to run npm install -g create-react-app as noted by @TaylorDarneille to fix it this time.

@geoffreyshepard
Copy link

I was having this problem and solved it by deleting my root user's node_modules. This allowed me to do a fresh install with create-react-app, might be worth a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants