4

I just updated to 20.04 and every time I open a terminal /usr/bin/env: ‘node’: No such file or directory shows at the very top. I have searched for answers but in the questions I found, npm did not work. It works for me though. I have no clue where to look or what to do.

1 Answer 1

8

If you used NVM for your node and npm, this may help:

nodepath=$(which node); sudo ln -s $nodepath /usr/bin/node

NVM installs it somewhere out of the norm, so creating this link solved my issue. You can run the command which node in your terminal to see where NVM installed it if you're curious.

4
  • When I get failed to create symbolic link '/usr/bin/node': File exists. Node is in /home/.nvm/versions/node/v15.0.1/bin/node. I don't know if that says anything.
    – Kikkomann
    Nov 12, 2020 at 20:01
  • That's fine. Mine is: /home/william/.nvm/versions/node/v14.15.0/bin/node Did you try running that command?
    – Will Estes
    Nov 13, 2020 at 21:35
  • Ok, I made it work, but I am not sure why. I removed my node version and installed the LTS instead and then I overwrote using the flag -f (thanks to Alexander Glulkhovtsev
    – Kikkomann
    Nov 15, 2020 at 14:15
  • From nvm maintainer: stackoverflow.com/a/47734737/470749
    – Ryan
    Nov 11 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .