We have a package from private npm package store. Now we have source code of it and want to use the source code as local package to test something before pushing to repo in dev machine. How can I achieve it?
-
Possible duplicate of How to install a private NPM module without my own registry?mihai– mihai2018-10-24 13:41:13 +00:00Commented Oct 24, 2018 at 13:41
-
It could duplicate but it's other way to resolve the problem, in my case, npm link is good enoughSteve Lam– Steve Lam2018-10-31 02:28:37 +00:00Commented Oct 31, 2018 at 2:28
Add a comment
|
4 Answers
use npm link https://docs.npmjs.com/cli/link
Example from the docs
cd ~/projects/node-redis # go into the package directory
npm link # creates global link
cd ~/projects/node-bloggy # go into some other package directory.
npm link redis # link-install the package
Note that package-name is taken from package.json, not from directory name.
1 Comment
Steve Lam
we also need rebuild package and the host as well