0

Trying to do a simple composer update of my core Drupal packages to the latest recommended version, and I'm being hit with a 404 and it won't update.

The error Composer spits out when running composer update drupal/core "drupal/core-*" --with-all-dependencies is:

[Composer\Downloader\TransportException]
  The "https://www.drupal.org/9/packages.json" file could not be downloaded (HTTP/2 404 )

I have tried manually visiting both https://www.drupal.org/9/packages.json AND https://packages.drupal.org/9/packages.json from a web-browser and am similarly met with a 404. Is the file legitimately missing right now, or did my Composer somehow bork itself?

The repo/packages section in my composer.json reads

"repositories": {
        "drupal": {
            "type": "composer",
            "url": "https://packages.drupal.org/9"
        },
        "0": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    }

I have not edited this at all since the update process was working properly--so I don't know why it wouldn't be working. This was also generated automatically during a Composer Drupal install and I wasn't the one who wrote it.

Any help would be appreciated--thank you! Let me know if there is more information I can provide.

New contributor
Bugiboop is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

2

There is no https://packages.drupal.org/9; the API stopped at 8. The repo at https://packages.drupal.org/8 has packages for Drupal 8+ (including 9):

"repositories": {
    "drupal": {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    }
}

It's not really possible to guess how you might have ended up in this situation. https://packages.drupal.org/9/package.json has never existed, so logically you should have received the same error previously if your composer.json was the same. Perhaps it was changed by someone else without your knowledge at some point.

1
  • Not entirely sure... I used Drush to clear SQL cache a few times, and had cleared the composer cache as well. Don't know how it got changed. Anyway, thanks for the help! That worked.
    – Bugiboop
    Sep 21 at 18:36

Your Answer

Bugiboop is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.