"npx create-react-app my-app" stopped working in 4.0.3
See original GitHub issueDescribe the bug
/tmp
▶ npx create-react-app my-app
You are running `create-react-app` 4.0.1, which is behind the latest release (4.0.3).
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 /private/tmp
npm ERR! command failed
npm ERR! command sh -c create-react-app my-app
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/peterbe/.npm/_logs/2021-02-23T16_06_05_071Z-debug.log
/tmp
▶ npx --version
7.5.6
If create-react-app
is not meant to work with npx
, then https://create-react-app.dev/docs/getting-started/ is wrong.
Did you try recovering your dependencies?
not applicable
Which terms did you search for in User Guide?
npx
- getting started
Environment
OSX Big Sur npm 7.5.6 node v15.2.1
Steps to reproduce
cd /tmp/
npx create-react-app my-app
Expected behavior
That it should create a directory called my-app
.
Actual behavior
See error above.
Reproducible demo
Not applicable.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:40 (2 by maintainers)
Top Results From Across the Web
reactjs - Error while creating new React app ("You are running ...
Try running npx clear-npx-cache to clear your npx cache and then running the npx create-react-app your-app command. Also have a look at this ......
Read more >you are running create react app which is behind latest
To solve the React.js error "You are running create-react-app 4.0.3, which is behind the latest release (5.0.0)", run the npx clear-npx-cache command and ......
Read more >NPX Create React APP Not Working - YouTube
To create a new React App, we use npx command with create - react - app and then project name. It should create...
Read more >Create React App cannot create new applications: No longer ...
When you try to install CRA from npx as shown below: · To resolve this error, you need to clear the cache of...
Read more >You are running `create-react-app` 4.0.3, which is ... - Medium
You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1). We no longer support the global installation of Create React App....
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 Free
Top 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
I just encountered this problem as well.
As a possible workaround, this worked for me:
This same kind of issue has been reported several times now:
These were all ultimately resolved with either:
Or, in one case (https://github.com/facebook/create-react-app/issues/10495#issuecomment-772893155), the exact opposite of what the error message tells you to do:
I suspect this is because the warning against “global” installs is really just checking for “is the version being run the latest version” which would be OK immediately after installing it globally, but then wouldn’t be OK two weeks & two new versions later.
There are also a lot of solutions that suggest completely uninstalling and reinstalling node &
npm
, which I think is mostly a really dramatic way to ensure you have clearednpm
’s (and presumablynpx
’s) cache of installed packages.