I am trying to use Create React App but getting an error that it requires Node 10 or higher. My node version is Node 8.10.0 and there's no way for me to update the Node version since it's a work machine. Is there any way to run an older version of Create React App to work with my older Node version?
I am trying to use Create React App but getting an error that it requires Node 10 or higher. My node version is Node 8.10.0 and there's no way for me to update the Node version since it's a work machine. Is there any way to run an older version of Create React App to work with my older Node version?
Share Improve this question edited Mar 22, 2021 at 19:26 sergdenisov 8,5729 gold badges51 silver badges66 bronze badges asked Mar 22, 2021 at 16:21 Supez38Supez38 3492 gold badges4 silver badges17 bronze badges 4 |2 Answers
Reset to default 32I managed to run it. It seems like the last versions of the packages which support Node 8.x.x are 3.4.1 for create-react-app
and 3.1.1 for react-scripts
. What I did:
npm uninstall -g create-react-app
npm install -g [email protected]
create-react-app my-app --scripts-version 3.1.1
But it's better to update your Node version to the actual (or LTS at least).
From my understanding you can add the flag --scripts-version
to your npx create-react-app
command. So for example if you wanted to run react version 15.6 you would run something like:
npx create-react-app appname --scripts-version 1.0.14
You can reference the react-script repo as well as the NPM Package for more information on which version of the script you would want to run. Hopefully this helped! If not please let me know and I'm more than willing to try and look more into it.
Edit:
Forgot to mention that you need to make sure to change the versions of react and react dom within your package.json after. So after installing you would run:
npm i [email protected]
npm i [email protected]
4.0.0
version. You could try to use the last3.x.x
create-react-app
version, seems like it's3.4.1
. – sergdenisov Commented Mar 22, 2021 at 16:31