"Unknown package has no name defined" composer error on upgrade Upgrading from Craft 3.4.20 running Composer 1.10.17 on PHP 7.2. Running ./craft update all returns the following error:
error: Unknown package has no name defined. [followed by JSON object related to GuzzleHTTP]

The error appears to be related to GuzzleHTTP. For testing I did the following:

Deleted the /vendor directory.
Deleted the composer.lock file.
Removed all composer.json dependencies except craftcms/cms, vlucas/phpdotenv and ext-json.
Ran composer install.
Ran ./craft update all.

Yielded same error.
Unfortunately, I am unable to find any information about this error from Composer documentation or bug reports.
Very similar to Devin's answer.
I came up against this on Friday and I had to follow these steps to resolve this issue.

Nuke the vendor folder within the project. rm -rf vendor/
Nuke the composer.lock file within the project. rm composer.lock
Clear the composer cache composer clearcache within the project.
Rollback to composer v1 composer self-update --1
Update composer globally to smooth it out composer global update
Then reinstall composer install within the project.
Finally, I was able to run ./craft update all

Hope this helps anyone else who comes up against this. It took several hours to resolve and figure out the necessary steps.