Search Unity

Publish Packages to registry server

Discussion in 'Package Manager' started by JPFerreiraVB, May 22, 2019.

  1. JPFerreiraVB

    JPFerreiraVB

    Joined:
    Sep 18, 2017
    Posts:
    28
    Hi folks

    I'm currently unable to publish a custom package to a private registry server.
    https://docs.unity3d.com/Manual/cus_share this link is broken
    https://docs.unity3d.com/Manual/upm-scopes also this one.

    I've setup a job in Jenkins, that fetchs the repo in git, then publish to the server.

    Code (JavaScript):
    1.  
    2. $package = Get-Content -Raw package.json | ConvertFrom-Json  
    3. npm publish --registry 'https://nexus.intra.COMPANY.com/repository/unity-hosted/'
    4.  
    And i get this error Error: "toString()" failed
    From what i've read, this error refers to a: "too big" file.

    Any ideas?
     
  2. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    29
  3. JPFerreiraVB

    JPFerreiraVB

    Joined:
    Sep 18, 2017
    Posts:
    28
    Last edited: May 22, 2019
  4. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    652
    Your package registry should have a setting for this. In verdaccio it's called max_body_size and the default is 10mb
     
  5. JPFerreiraVB

    JPFerreiraVB

    Joined:
    Sep 18, 2017
    Posts:
    28
  6. JPFerreiraVB

    JPFerreiraVB

    Joined:
    Sep 18, 2017
    Posts:
    28
    Just if anyone encountering this error!

    I did npm pack before npm publish