Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

GitHub Package Registry with Private Packages & Proxying Scope to NPM

 

I have some scoped public packages on npm registry as using scopes seems to be a good practice in general. Of course I have the same username on npm registry and GitHub and both registries require that the scope I can publish to is my username - which all makes sense.

I have published a private package to GPR call it `@activescott/my-private-package`. I can install that package successfully using the `.npmrc` as follows

 

registry=https://npm.pkg.github.com/activescott
//npm.pkg.github.com/:_authToken=MY_PERSONAL_ACCESS_TOKEN
always-auth=true

 

 

and the following install command:

$ npm install @activescott/apple-availability@1.1.3

 

The issue comes when I try to install a public package with this command:

npm add @activescott/eslint-config

 

I get the following error:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://npm.pkg.github.com/activescott/@activescott%2feslint-config - npm package "eslint-config" does not exist under owner "activescott"
...

 

How can I pull some packages from the same scope that are private on GPR and public on npm registry?

2 Replies
Highlighted
Copilot Lvl 2
Message 2 of 3

Re: GitHub Package Registry with Private Packages & Proxying Scope to NPM

@activescott did you figured out the solution for this situation. Me too running into the same problem.

Highlighted
Copilot Lvl 2
Message 3 of 3

Re: GitHub Package Registry with Private Packages & Proxying Scope to NPM

Unfortunately I did not. I ended up stopping the use of GPR due to this issue :(