NodeJS interpreter name(
node) on Ubuntu has been renamed to
nodejs because of name conflict with another package. Here's what the readme.debian says:
The upstream name for the Node.js interpreter command is "node". In Debian the interpreter command has been changed to "nodejs".
This was done to prevent a namespace collision: other commands use the same name in their upstreams, such as ax25-node from the "node" package.
Scripts calling Node.js as a shell command must be changed to instead use the "nodejs" command.
However, using nodejs mucks up installing packages using
npm. Package installation fails with the following error:
sh: 1: node: not found npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian
How do I make npm understand that nodejs is already installed on the system but the interpreter name is different?