When I run
node -v
v14.17.6
Then I tried
sudo npx create-react-app custom-hooks
I got
error @typescript-eslint/[email protected]: The engine "node" is incompatible with this module. Expected version "^10.12.0 ||
>=
12.0.0". Got "11.10.0" error Found incompatible module info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Can someone help? How I come get this error when terminal told me I have 14.17.6 as I showed. How come it says Got "11.10.0"?
CodePudding user response:
you are using two different environments or privilege and this is why you get this error.
you are trying to get your node version with:
node -v
you could get it via
sudo node -v
usually, beginners will be caught in this type of problem and it's okay.
Summary:
your node version in the actual environment and superuser
environment is different and you are trying to scramble them together.
General Advice: don't use sudo
before your Linux commands at all and just use it as needed (and you know about it).
CodePudding user response:
Running without sudo
worked.
It had large initial delay though (that was confusing me probably initially)