6

I have a package that I published to Github package repository and it was successful, still, I am not able to see this package in the packages section

https://i.stack.imgur.com/WV7fr.jpg

https://i.stack.imgur.com/kGOFG.png

Please refer to the attached screenshots, as seen npm publish is successful. What could I be missing?

Hitesh Balwani
  • 175
  • 1
  • 12

6 Answers6

6

Once you released the package and updated the repo but the package is not showing in the repo as herePackage not found

Steps to link library to repo

  1. Go to your profile on GitHub https://github.com/{your_user_name}?tab=packages. you must see the list of packages like here. List of packages

  2. Click on the package that you need to link to repo. You must get link to repo or go to this link https://github.com/users/{your_user_name}/packages/npm/{your_package_name}/settings

  3. Select the library repo.

  4. You can now view the packages on the repo too.

TeachMe
  • 535
  • 1
  • 5
  • 16
4

Packages are not visible as releases, they will be visible in packages section for your organization:

https://github.com/orgs/ORGANIZATION/packages

For personal packages:

https://github.com/USER?tab=packages

Keep in mind that packages won't be visible under the repository "Packages" section until their name is the same as a repository. It doesn't matter that you publish it from this repository action. In case you don't have a resository with such a name - it will be created for you by GitHub.

Grzegorz Krukowski
  • 18,081
  • 5
  • 50
  • 71
2

I have been experiencing the same thing since Yesterday. I haven't tried with an already released package, but I can confirm new packages are not appearing neither in the org/user packages tab nor in the packages section of the repository despite the fact npm says that they have been published successfully.

  • ok , lets wait an see we get a status update from them. Thank you for this update – Hitesh Balwani Aug 25 '22 at 12:11
  • I submitted a ticket to Github explaining all this @HiteshBalwani, the more tickets they receive with this issue, the quicker they will pay attention to this in theory. – Mauro Gabriel Titimoli Aug 25 '22 at 14:05
  • does this seem to be of relevance? https://github.blog/changelog/2022-08-18-deprecation-notice-graphql-for-packages – Hitesh Balwani Aug 25 '22 at 16:32
  • Their customer service replied to me that they had recently changed the packages permissions, and the issue could be related with this, and indeed it was, the owner of the organization could see the package but I can't, so after going to the package settings and add the repo to it, we can now all see it there. Hopefully this helps to you as well, cheers. – Mauro Gabriel Titimoli Aug 25 '22 at 17:01
  • can you send me the link to the ticket you created? – Hitesh Balwani Aug 30 '22 at 11:11
  • Unfortunately I can't, they are personal, you can create one in this link: https://support.github.com/tickets/personal/0 Do you still have the same problem? Did you try adding the repository to the package permissions? – Mauro Gabriel Titimoli Aug 30 '22 at 13:16
  • I am unable to see the package itself as I am not the owner of my organization – Hitesh Balwani Aug 30 '22 at 17:30
  • They are still not showing. – Aqib Oct 19 '22 at 16:05
1

This could be due to package visibility.

In my organization, we recently started having issues where new releases of some packages had severe read restrictions. The way I identified this issue was this:

  1. In the context of my personal account (or whatever scope you are consuming the packages from), check the packages for whatever repo/org you are having problems with. In our case I could not see the newest version of a package that was reported as successfully pushed in CI.
  2. Get someone with admin access, preferably to the organization (if the repo belongs to an organization), have them check the same thing, and compare results. In our case the org admins could see the latest versions of the package.

If having the above problems, they can be fixed (in the short-term) by setting the package visibility levels by someone with admin access to the organization.

eskilgh
  • 46
  • 2
0

You can add

"repository": {
  "type": "git",
  "url": "git+https://github.com/<user>/<repo>.git"
},

to the package.json. This allows the package to be correctly "mapped" to the repo.

-1

As a workaround, you could use their List Packages API using GitHub CLI:

  1. Make sure to have a classic token with the minimum required scopes: repo, read:org and read:packages
  2. Authenticate with GitHub CLI using by opening your terminal and execute the following command :
gh auth login

These are the options I choose:

What is your preferred protocol for Git operations? 
HTTPS

Authenticate Git with your GitHub credentials? 
Yes

How would you like to authenticate GitHub CLI? 
Paste an authentication token

Paste your authentication token: 
****************************************
  1. After you are authenticated, run the following command:
gh api \
  -H "Accept: application/vnd.github+json" \
  "/orgs/{YOUR_ORG}/packages?package_type={TYPE}"

// Type can be one of: npm, maven, rubygems, docker, nuget, container
  1. A json will be printed, grab the package id:
  ...
  {
    "id": 1234567,
    "name": "...",
    "package_type": "...",
    "owner": {
      "login": "...",
  ...
  1. Adapt the link with the package ID and paste into your browser: https://github.com/{$ORG}/{$PROJECT}/packages/{$ID}
rsicarelli
  • 1,013
  • 1
  • 11
  • 28