Trying to install the scoped/private GitHub package that you deployed?
Here we will talk about the setup required to install the private GitHub package.
There are some prerequisites that you have to set up prior to installing the package.
Remember to copy the
PAT to somewhere and save it. Because you wouldn't be able to retrieve them afterward.
Below is the step-by-step guide.
Firstly, create the
.npmrc in your Node project if you haven't. Paste the following template into your
@OWNER with the scoped name. This is the Github username. In my case, it would be
Then, replace the
@TOKEN with the Github Personal Access Token that you have created in the Prerequisites section.
Now, you have configured the
.npmrc correctly. Let's verify by installing the package.
npm install @tlcheah2/sample-publish-github-package
The package now should be installed successfully.
I hope this post does provide value to you and see you in the next one.