Thanks for creating a dedicated issue for this, @waqasibrahim (the previous issue wasn’t getting any attention since it’s marked fixed for an unrelated reason).
Here are the steps to reproduce:
- Create a new private repository. Per npm package naming requirements, make sure the repo owner and name (i.e. @repo-owner/repo-name) are both lowercase.
Create a personal access token with the following scopes:
Authenticate against the GitHub NPM registry using your GitHub username and personal access token:
$ npm login --scope @repo-owner --registry https://npm.pkg.github.com
Use npm init to create a new npm package called @repo-owner/repo-name.
Publish a new (and only) version of the NPM package with npm publish.
Check that the package is visible with npm view:
$ npm view @repo-owner/repo-name
@email@example.com | ISC | deps: 0 | versions: 1
Now, try to install the package:
$ npm install -g @repo-owner/repo-name
npm ERR! code E404
npm ERR! 404 Not Found - GET https://npm.pkg.github.com/download/@repo-owner/repo-name/0.0.1/8d84896fe3f54d8ce56962cf1f7fc760e56efe52f2d471cf703103c476d3c9a9
Check that though the GitHub UI is showing the new version, its tarball links to https://notfound.pkg.github.com/: