If you have upgraded Composer on your machine to the latest version i.e. version 2 and if you are working on the project that still uses some old packages which are dependent on Composer 1, you might receive following error
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
To fix this you can either upgrade the versions of the plugins to work with Composer 2, or if that isn’t an option you can downgrade the composer version by running the following command
composer self-update --1
To go back to version 2, you can run the following command
composer self-update --2