Global Node modules not installing correctly. Command not found

前端 未结 9 1046
北荒
北荒 2020-11-29 20:26

I am having a problem installing global node modules and everything I find online says the solve is just adding -g. Which is not the problem. I believe it\'s a linking issue

9条回答
  •  抹茶落季
    2020-11-29 20:41

    Add /usr/local/share/npm/bin to your PATH (e.g., in .bashrc).

    For more info, see npm help npm:

    global mode: npm installs packages into the install prefix at prefix/lib/node_modules and bins are installed in prefix/bin.

    You can find the install prefix with npm get prefix or npm config list | grep prefix.

提交回复
热议问题