#Assume we are in directory with package.json with name @garypeterson/foo > npm link #Establishes link @garypeterson/foo to this module #To use link, go to consumer module directory, let's say module "foo-test", and do: > npm link @garypeterson/foo #List all local links (to a package) #First navigate to package folder in your CLI, then: > npm ls --link=true #List all links > npm ls -global --depth=0 --link=true #Remove a link > npm rm --global @garypeterson/foo
#In package folder where package has module name "foo" > npm link #In consumer folder > npm link foo
#In consumer folder > npm unlink --no-save foo #In package folder (where package has module name foo) > npm unlink