Member-only story

How to Not Need a Private npm Registry

npm install from a git repo

Avery Duffin
Better Programming
2 min readMay 1, 2020
Photo by Dayne Topkin on Unsplash

Have you found yourself like me scouring the internet for the cheapest easiest way to do something? I spent a few hours digging into finding a way to host, deploy, and install a package using npm but without using npm. I think I found the cheapest most elegant solution, and I hope you can benefit from what I’ve learned.

Here’s the short answer: Use a Git repository. It really doesn’t matter which one you use. But it can even be a repository that isn’t public.

The nice thing about using npm to manage your packages is that you can install everything with one command along, and it’ll only give you the files that you need to import.

The steps to complete this are as follows.

  1. Create a Git repository (in this case, mine is in GitHub)
  2. Run npm init on that repo
  3. Configure your package.json
  4. Configure package.json in a separate application to point to that repo

I'm going to skip a few steps here because I'm going to assume you know how to do some of these.

I'll skip to showing you what my package.json looks like.

Configure package.json

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Avery Duffin
Avery Duffin

Written by Avery Duffin

Im a software engineer, react developer, inventor, salesman, family man, religious, and outdoor connoisseur

No responses yet

Write a response