Aha, that would explain the error!
Now time to find out where that very old one is hiding itself
You could try:
npx -c "where node"
npx -c "node --version"
If that gives you a different path and version from where node
and node --version
(without the npx -c
prefix), it could point you to your old version.
Ideally you want npx -c "where node"
and where node
to give you the same path to avoid problems like you’ve seen here where Node.js launched in a subprocess uses a different version.