To fix env: node: No such file or directory error in Mac, we reinstall Node and npm.
For instance, we run
$ brew uninstall --force node
$ brew uninstall --force npm
to uninstall node
and npm
with brew
.
And then we reinstall both with
$ brew install node