skip to Main Content

After installing a new version of a Magento 2 module composer fails on every command. Also the backend of Magento isn’t working anymore:

1 exception(s):
Exception #0 (UnexpectedValueException): Package magento/composer's 
source key should be specified as {"type": ..., "url": ..., 
"reference": ...},
{"type":"git","url":"https://github.com/magento/composer.git","reference":null} given.

Also when using composer -v command via ssh the same error is showing.

When trying to flush the cache via ssh the same error is showing and also an extra error:

Fatal error: Uncaught Error: Class 'Cli' not found in

Does anyone know how to fix this?

2

Answers


  1. Few things you can try:
    Try to reinstall composer.
    Also you can try running composer clear-cache. Also check for any running composer process and kill then first.

    Login or Signup to reply.
  2. If this is still an issue anyone has I found through much digging that reference cannot be set to null. If a download from source is necessary than I recommend moving up a directory for your url or use a dist instead of source

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search