Matt Seymour
/usr/bin/env: node: No such file or directory

The above error can occur when running nodejs on Ubuntu. The cause of the error is simply that node cannot be found on your system PATH. The reason for this error is that within the Ubuntu software repository there is another application called node which can use /usr/bin/node which is not nodejs. To resolve this nodejs instead use the binary name nodejs and not node like some would rather it.

What this means is that some node modules reference the wrong node when in Ubuntu.

So the solution:

To resolve this issue you can simply symlink /usr/bin/nodejs to /usr/bin/node. This will mean both node and nodejs are available on the system path.

Open a terminal and using sudo enter:

sudo ln -s /usr/bin/nodejs /usr/bin/node