Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-28842

Github npm package registry does not work with Nexus Repo 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.31.1
    • Fix Version/s: 3.35.0
    • Component/s: NPM
    • Labels:
    • Notability:
      2

      Description

      Create an npm project in github using the guide here:

      https://docs.github.com/en/packages/quickstart

      Publish the release. You should then see your npm package published in the "packages" section of the web UI when looking at your github project.

      Once you've got a package published, edit the package.json file and bump the version, commit, and release again, and then do that a third time.

      Create an access token in github with "packages:read" privilege.

      Create an npm proxy repository with remote of "https://npm.pkg.github.com" in Nexus Repo. Configure authorization in that repository using your token, plus your github user ID.

      Now try to install the latest version you published using npm.

      npm install @username/testnpm@1.0.3

      That will work.

      Try to install the previously published version:

      npm install @username/testnpm@1.0.2

      That will fail.

      The logs for the second attempt will show that it successfully download the package, but it deletes it for some reason that is not logged, and then returns a 404. 

      Note: This may have something to do with the fact that github npm registry does not follow standard naming conventions for package tarballs. They are published with this style of name:  

      "tarball":"http://localhost:8081/repository/npm-git/@someuser/testnpm/-/d9ee934f08db8990ab9453762b9fd5971dbf0ab1d004d9a8e93ea3c859c86e59

      Expected: Npm works with this remote registry, so Nexus Repo should also.
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mbucher Michael Bucher
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Damian Bradicich Damian Bradicich
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title