Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

`npx create-react-app` says it requires "Node 14 or higher" but I'm running 17.4.0. How can I fix this?

I’m trying to start a new React project on my Mac (running Mojave 10.14.5).

In VS Code’s Terminal I ran npx create-react-app my-app and got a message saying that my version of Node was out of date. I updated node to version 17.4.0 and ran it again – still got the same message.

I then ran clear cache: npm cache clean --force and tried again – still no luck.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

node -v says I’m running 17.4.0.

Would anyone know what I could do?

>Solution :

The first thing you need to do is to uninstall the create-react-app and then npm install it again.
You can use these commands for uninstalling the create-react-app:
if you are using NPM:

npm uninstall -g create-react-app

if you are using Yarn:

yarn global remove create-react-app

for creating new app you can use the following command:

npx create-react-app@latest your-project-name

You must notice that the create-react-app should not be installed globally as it is documented in Create-React-app Docs.

Also please note that it is safe to say, always use the LTS version of node (that is 16.13.2 at this time).

It should solve your problem with initiating a new react app.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading