Modifying $PATH variable

后端 未结 3 743
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-08 14:16

Trying to install node.js.

Did brew install node

It seems to have worked.

However, received this message upon its completion

3条回答
  •  盖世英雄少女心
    2021-02-08 14:35

    The cleanest solution is adding the following between the two lines you posted:

    export PATH="/usr/local/share/npm/bin:$PATH"
    

    That way everything stays readable and you prepend it to PATH just like the program suggested it. And if you ever want to undo the change you just remove that line instead of editing a possibly long line.

提交回复
热议问题