I'm simply trying to create a react app with the command npx create-react-app my-app
but get this error:
[email protected]: The engine "node" is incompatible with this module. Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0". Got "8.5.0"
I've tried updating node but it seems to not work, checking the version it says 8.5.0 just like in the error. Even restarted my computer as a last option but that also didn't help..
Is there anything else I could try? Any suggestions are welcome.
I had the same thing and spent few hours trying to figure it out. I think it was the webpack. Finally, I ended updating the node.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Finally realised the problem was my old version of node, I had nvm installed and had to update which node version I'm using with nvm use node
.
Update:
I had to use that command every time I started a new terminal session. Also had problems when some other packages were picking up the wrong node version for some reason.
That can be fixed with the command nvm alias default 10.11.0
, or which ever version you want to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With