Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Unable to publish UPM packages to GitHub Package Repo as of 07/10/2020

Discussion in 'Package Manager' started by MattTaylorEP, Oct 9, 2020.

  1. MattTaylorEP

    MattTaylorEP

    Joined:
    Jul 23, 2020
    Posts:
    3
    https://github.community/t/unable-t...t-name-to-publish-url-as-of-07-10-2020/136643

    We use GitHub Package Repo to store our UPM packages. Yesterday we've stated getting the following error:

    Code (csharp):
    1.  
    2. npm ERR! code E400
    3. npm ERR! 400 Bad Request - PUT https://npm.pkg.github.com/@electricplaybox/com.electricplaybox.test - name in package.json "com.electricplaybox.test" does not match publish URL "@electricplaybox/com.electricplaybox.test"
    4.  
    5. npm ERR! A complete log of this run can be found in:
    6. npm ERR!     C:\Users\Matt\AppData\Roaming\npm-cache\_logs\2020-10-08T15_47_42_234Z-debug.log
    7.  
    Indicating that GitHub no-longer supports packages that are not named @scoope/com.who.what. We've been using the trick of adding our @Scope to the end of the repo URL so that we end up with UPM compatible package names without the @Scope.

    I've raised a support ticket with Github, asking if this is an intentional (although not documented in the change log) on their part.

    Has anyone else been experiencing this issue?
     
  2. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    233
    Yep, same issue here, just yesterday I started trying the custom packages functionality for the first time, and almost went crazy trying to make them work with GitHub Packages, until I gave up... Please, @MattTaylorEP, let us know if you get a response for the support ticket.
     
  3. MattTaylorEP

    MattTaylorEP

    Joined:
    Jul 23, 2020
    Posts:
    3
    ok, so until now we've been working with a hack to make them work together.

    UPM does not like packages with the @Scope in the name, so in your manifest.json scoped repo section you need to add your @Scope to the end of the package repo URL, and then publish the packages to github without that in the name.

    It seems that a few days ago GitHub has switched up their publish requirements that you have to have the repo URL and package name the same, which for us breaks this workaround.

    Will definitely post back as soon as I hear anything back from them or we work out another workaround.
     
    Favo-Yang likes this.
  4. MattTaylorEP

    MattTaylorEP

    Joined:
    Jul 23, 2020
    Posts:
    3
    ddsim, Favo-Yang and Trisibo like this.
  5. supita_unity

    supita_unity

    Unity Technologies

    Joined:
    Dec 13, 2019
    Posts:
    225