Question

I've just created my first component on packagist.org, this is a forked version of greensock-js.

I put "components/greensock-js": "1.11.*@dev" into the require section of my composer.json file, but the issue is composer can't find this package, saying

no matching package found.

What did I do wrong?

Was it helpful?

Solution

It is now working fine:

$ c show components/greenshock-js
name     : components/greenshock-js
descrip. : GSAP: Professional-Grade HTML5 Animation
keywords : JS, HTML5, component, animation, gsap
versions : dev-master, 1.11.x-dev

Most likely you just lacked some patience :) It can take up to 10minutes for changes to propagate to composer. This will hopefully be reduced in the future again as we improve the code.

OTHER TIPS

If you are using Composer V1, it's worth noting that V1 packagist metadata is updated much less frequently since May '21, as mentioned here.

Reduced v1 metadata API update rate starting in May 2021

The update rate for new versions will be reduced from every-minute currently to once every 15 minutes. This means new releases will take a few minutes longer to be available for installation with Composer 1.x.

Restricted access to unused packages via the v1 metadata API starting in May 2021

This means new packages and old unused packages will only be visible to Composer 2 until someone installs them, at which point they will become visible to Composer 1 as well (within 24h as this process happens on a nightly basis).

If a newly uploaded package is not found, and you are using composer V1, your options are:

  • take the slower updates into account and wait quite a bit longer
  • upgrade to composer V2. V2 packagist metadata is updated much faster than V1 ever was.

This means new packages and old unused packages will only be visible to Composer 2 until someone installs them, at which point they will become visible to Composer 1 as well (within 24h as this process happens on a nightly basis).

So looks like you need to install the package using Composer 2 and wait for 24 hrs for it to become available to be installed with Composer 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top