Photo by Erol Ahmed on Unsplash

NPM pack and unpack in 2 seconds

⭐️ Super short note on NPM pack ⭐️

I needed a quick way to check what files were included in my NPM package bundle and wanted to locally “zip” and “unzip” my NPM Package. This is how you can achieve it 👇

// create a packed tgz file
$ npm pack;
// will unzip the file and install it in a folder called package
$ tar -xzf <path to tgz file>

That’s all for today folks.

Let me know what you think or if you have questions. You can contact and follow me on Twitter 🏄‍♀️



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christina Hastenrath

Christina Hastenrath

Molecular Biologist turned Software Engineer. I write about my code. Connect with me on Twitter @etTinchen