I'm simply trying to create a react app with the command npx create-react-app my-app
but get this error:
css-loader@1.0.0: 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.
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.