Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why composer can not find my brand new package on packagist.org?

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?

like image 278
haxpanel Avatar asked Mar 25 '14 14:03

haxpanel


2 Answers

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.
like image 159
yivi Avatar answered Sep 21 '22 08:09

yivi


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.

like image 28
Seldaek Avatar answered Sep 21 '22 08:09

Seldaek