DEV Community

Discussion on: How to Create and Publish a React Component Library

Collapse
 
alexeagleson profile image
Alex Eagleson

A 404 not found GET error usually means a permissions issue. Are you trying to install it from the same machine you published from?

Because you published to Github privately, the machine that is installing it needs to have a Github token with access permission in its npmrc file, same as the one that did the publishing

If you want to be able to use your package publicly on any machine, then publish it to NPM instead of github (just look up their instructions for that, it's even easier than publishing privately)

Collapse
 
92srdjan profile image
WingsDevelopment

I just figured this out, there were two problems, I had to remove dist from .gitignore and command copied from github: npm install @wingsdevelopment/export-poc3@0.0.2 didn't work, so i changed it to npm install wingsdevelopment/export-poc3 and it worked!
I am not sure why I had to remove dist from gitignore and push it to the github repo ?

Thread Thread
 
alexeagleson profile image
Alex Eagleson

You should not, it's very likely that is a symptom of an unrelated problem. There is no scenario where including a build folder in a repo is the right decision. I could recommend circling back and checking every step of the process to ensure you have configured correctly

Good luck!

Thread Thread
 
lalilunar profile image
Laura

hi, I'm having issues trying to use my private repo/package! I tried to look for a solution but I couldn't find it , please help me if you can!

Thread Thread
 
olegfilonchuk profile image
Oleg Filonchuk

Hi, I found out that your github username should be spelled in lowercase everywhere you use it e. g. .npmrc

Some comments have been hidden by the post's author - find out more