重新启动终端后,我无法再执行节点

重新启动终端后,我无法再执行节点

问题描述:

由于某些原因,我重新启动后的终端,我就不能再执行节点。尝试这样会导致以下错误:

For some reason, after I restart Terminal, I won't be able to execute node anymore. Trying so results in the following error:

-bash: node: command not found

我试着删除节点,并重新安装。这样的作品,但只要我重新启动终端,魔法消失了。

I tried removing node and reinstalling it. That works, but as soon as I restart Terminal, the magic is lost.

这是怎么回事?

可以在魔法涉及设置 PATH 变量,节点将是路径上,如果这样的话魔法添加到您的的.bashrc

could the magic involve setting the PATH variable so node would be on the path if so then add the magic to your .bashrc?