I cloned some npm package from github and put the package in a local folder, for example.
c:\git\package
I used "npm install -g" to install the package, which works very well.
npm install -gc:\git\package
However, when I made some change in the package code, for example. checked some branch. I could not use "npm update" to update the installed package. I tried:
npm update -g
and
npm update -g packagename
or
npm update -g folderpath
None of them worked. I have to use "npm install" to reinstall it for the update, which takes time to reinstall all the dependencies.
Why does npm only support installation from a folder, but not updating from a folder? If he supports, what should I do? Thanks.
source share