in npm ~ read.

Testing a NPM package locally

I ran into this today. I had a pain of a time figuring out how to install a local NPM package for testing.

Here is a quick how to.

From the local package you want to install, package the module. You can do this via npm pack. This will create a tgz file of the package.

Change directories to where you want to install your test package. You can install the package via npm install /path/to/packaged-file.tgz.