Create React App says Node is too old, and npm will not run on the new one
You are running Create React App. Create React App requires Node 14 or higher.Short answer
The shell is running an old Node.js that is below the version Create React App needs. Install a current LTS release with nvm, open a new terminal, confirm node -v, and run npx create-react-app again. Remove any old global create-react-app first.
Fix it fast
1Find out which cause you have
Print the versions the shell actually uses. The Node version is the one in the error, not the one you think you installed.
node -v npm -v which -a node2Match what you see, then jump to its fix
- 1
node -v prints a version below 14, for example v10.19.0The Node.js on your PATH is older than the tool needsFix - 2
nvm install finished, yet node -v in a new terminal still shows the old versionnvm installed the new version, but the shell does not use itFix - 3
The same tool runs every time instead of the latest oneAn old global create-react-app is installedFix
- 1
What does the error look like?
You are running Create React App. Create React App requires Node 14 or higher.npm does not support Node.js v10.19.0
Cause 1 of 3
The Node.js on your PATH is older than the tool needs
1Check
The Create React App guide asks for Node 14 or newer on the development machine. The error is only reading node -v.
node -v2Fix
Install nvm, open a new terminal so the command exists, then install and select the current LTS release.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash
# close this terminal, open a new one, then:
nvm install --lts
nvm use node3Verify
node -v now prints a current version and the old error is gone.
node -v
npx create-react-app my-appConfirmed by github.com
Cause 2 of 3
nvm installed the new version, but the shell does not use it
1Check
nvm only changes the version for shells where it is loaded. In a new tab, run nvm use, or pin the version for the project with a .nvmrc file.
command -v nvm
cat .nvmrc2Fix
Add a .nvmrc to the project root so nvm use and nvm install pick the version without arguments.
echo "lts/*" > .nvmrc
nvm install
nvm use3Verify
node -v shows the version nvm just selected.
node -vConfirmed by github.com
Cause 3 of 3
An old global create-react-app is installed
1Check
The Create React App docs advise removing a global install so that npx fetches the latest version.
which create-react-app2Fix
Uninstall the global package, then run it through npx.
npm uninstall -g create-react-app
npx create-react-app my-app3Verify
npx downloads and runs the tool without the Node version error.
ls my-app/package.jsonConfirmed by create-react-app.dev
How do I stop it coming back?
- Pin the Node version per project with .nvmrc and an engines field in package.json.
- Do not use the Node package from an old system repository for development; use nvm or the official installer.
- Create React App is deprecated; for a new app, look at a framework from the React docs instead.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
Related fixes
Back end
npm run build says react-scripts: Permission denied in CI
sh: react-scripts: Permission denied
The shell found node_modules/.bin/react-scripts but may not run it.
3 causes, each with a fixBack end
Application Load Balancer returns 502 for a Node.js target
HTTPCode_ELB_502_Count
An ALB returns 502 when the target gives it something it cannot use: a refused or reset connection, a connection closed mid-request, a bad response, or a header over 32 K.
4 causes, each with a fixBack end
Axios call from a React app comes back 404
404 (Not Found)
Status code 404 means a server answered, but it has nothing at that path.
3 causes, each with a fixBack end
corepack enable fails: permission denied while creating the pnpm link
Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
corepack enable writes small link files for yarn and pnpm next to your node binary.
2 causes, each with a fixBack end
npm start stops with Could not find a required file in a React app
Name: index.html
react-scripts checks for two files before the dev server starts: public/index.html and a src/index file.
3 causes, each with a fixBack end
firebase deploy cannot load your functions: user code failed to load
Functions codebase could not be analyzed successfully. It may have a syntax or runtime error
The Firebase CLI loads your functions code on your machine before it deploys, to learn which functions exist.
4 causes, each with a fix