Plugin Error: "Unable to find component class" I'm suddenly getting an error on my plugin fieldtype even though I didn't make any changes to it. On Craft's publish page where my field is supposed to be I get the error:

Unable to find component class 'kgrote\siteutilities\fields\Regionselect'.


Really have no idea where to start looking here. The Regionselect class exists in the fieldtype file and the name of the file matches the class. It might help if I knew where this error was originating from.

Additionally, the plugin shows as "Disabled" in the Settings area and I can't enable it, and there is no "Uninstall" option available in the dropdown.
So what happened was I un-gitignored my Composer files so I could deploy them to another environment. Then I switched from that branch to a different branch with different Composer files. After I switched back, I ran into a Composer bug (mentioned here in the docs) where Composer will forget about plugins loaded using the path method if the files change.

So I had to perform these steps:


navigate to my craft project folder in the terminal
execute composer remove kgrote/siteutilities
delete the kgrote directory from craft/vendor
execute composer install kgrote/siteutilities


SUUUUUPER annoying, but there you have it.