Node.js not found on Linux enviroment
If you are getting the same error like me trying installing something with node, I will show you two solutions for this:
/usr/bin/env: node: No such file or directory
The problem is the system is looking for the wrong node.js executable (/usr/bin/node
) when probably you have /usr/bin/nodejs
in your system, so the solution for all Linux distributions is to create a symbolic link:
sudo ln -s /usr/bin/nodejs /usr/bin/node
If you have Debian or Ubuntu there is a package for it (nodejs-legacy
):
sudo apt-get install nodejs-legacy
And if you don't want to install the package you can use this command:
update-alternatives --install /usr/bin/node node /usr/bin/nodejs 99