Global Node modules not installing correctly. Command not found

前端 未结 9 996
北荒
北荒 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:43

    The problem I had was missing the binaries because the user specific .npmrc file in my home directory had bin-links set to false, though the default is true.

    Just in case this is your problem check that none of your .npmrc files have it set to false.

    Then re-installing all modules will create the binaries at the prefix so your PATH can see them.

    0 讨论(0)
  • 2020-11-29 20:51
    1. Add the following line to your ~/.bash_profile

      export PATH="$HOME/.npm/bin:$PATH"
      
    2. Load bash profile

      bash -l
      
    0 讨论(0)
  • 2020-11-29 20:59

    For Windows users

    Add this to your path: "%AppData%\npm"

    0 讨论(0)
提交回复
热议问题