Global NPM package installed but command not found

后端 未结 4 1908
暖寄归人
暖寄归人 2020-12-04 23:38

I have globally installed two npm packages \"download\" and \"enigmavirtualbox\" via command line:

npm install -g download and npm install -g engi

相关标签:
4条回答
  • 2020-12-05 00:14

    The executable binaries and .cmd files end up in C:\Users\<username>\AppData\Roaming\npm (minus the node_modules at the end) so adding that path to the PATH env. variable fixed the issue.

    0 讨论(0)
  • 2020-12-05 00:16

    Here more info about this topic : https://medium.com/@alberto.schiabel/npm-tricks-part-1-get-list-of-globally-installed-packages-39a240347ef0

    List of packages which have been install globally

    npm list -g --depth 0
    
    0 讨论(0)
  • 2020-12-05 00:37

    If the above method does not work then use this command to explicitly set the path

    npm config set prefix c:/Users/<username>/AppData/Roaming/npm
    
    0 讨论(0)
  • 2020-12-05 00:38

    Set your PATH environment variable to C:\Users\YOUR_USERNAME\AppData\Roaming\npm. This fixed it for me.

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