Publish NPM Package to Github for React, Node and Nest JS
Build and Publish Your Own NPM Package in 1 Minute :)
🚀🚀 How to Publish Private NPM Packages With Github Package Registry
We'll begin by first making our modules repository private.
Publishing private NPM packages using GitHub Package Registry involves several steps to configure your package and authenticate with GitHub. Here's a step-by-step guide:
🚀🚀 Prerequisites
Node.js and npm: Make sure you have Node.js and npm installed.
GitHub Account: Ensure you have a GitHub account and a repository where you want to host the package.
Repository Permissions: Ensure you have the necessary permissions to publish to the GitHub repository.
🚀🚀We will follow these steps
- Create a GitHub Personal Access Token
- Authenticating With NPM Using the GitHub Registry
- Publish Your Package
- Using Your Private Package in Another Project
🚀🚀 Outline Video
00:00 Why do we need a Package
02:00 Things we need for publishing the package
03:30 npm login to login account
04:30 Simple Demo Code setup
05:00 Generating Access Token
05:30 npm login to GitHub npm
07:20 npm run build and publish
08:20 npm publish to publish package
09:00 Using package in another project
09:30 npmrc setup
Comments