NPM Notes

NPM global directory

C:\Users\xxx\AppData\Roaming\npm

Command Alias

If I have no access to modify system path, when I have some packages installed, I might use alias command. I have installed @angular/cli, in the way for using ng command.

$ alias ng='/c/Users/what_a_poor_user_with_no_access/AppData/Roaming/npm/ng'

List all global installed packages

$ npm list -g --depth=0

Windows Command Prompt

//get path environment
C:\Users\xxx>set path 

//append items to path. This is only available on CURRENT cmd window.
C:\Users\xxx>set path=%path%;C:\MyEnvironmentDirectory

你可能感兴趣的:(NPM Notes)