Node forever /usr/bin/env: node: No such file or directory

后端 未结 3 1000
粉色の甜心
粉色の甜心 2020-12-04 08:45

I have installed nodejs using:

apt-get install nodejs

Then i have installed npm using:

apt-get install npm
<
3条回答
  •  一生所求
    2020-12-04 09:13

    EDIT: As of December 2018, this is no longer the correct way. See the other two answers.

    You need to symlink the nodejs executable to node sudo ln -s "$(which nodejs)" /usr/local/bin/node The reason for this is that when you do "apt-get install node", it installs an unrelated package, so they had to choose a different name so it wouldn't conflict

提交回复
热议问题