0
votes

When trying to install npm on "bash on ubuntu on windows", it installs, but every call to npm or whatever results in the error:

"/usr/bin/env: node: No such file or directory"

How to solve this?

1

1 Answers

1
votes

This is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it.

In "bash on ubuntu on windows", one has to run it with sudo:

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

Originally found here: https://github.com/nodejs/node-v0.x-archive/issues/3911
(Thanks, digitalmediums)