Node: Local NPM Modules

cd /path/to/package.json

Then run the pack command:

npm pack

This will create, in the same directory, a tarball named after the name of the project + the version specified in the package.json.

This is exactly what is published to! You can now see what’s inside

tar -tf packagename-version.tgz

Or you can install it in your project to test it in integration.

cd path/to/your/project/
npm install ../path/to/your/npm/packagename-version.tgz

blog comments powered by Disqus