How to get rid of Impossible to process constructor argument error?

When I go to compile I get this error-

 php bin/magento setup:di:compile

 Compilation was started.
 Area configuration aggregation... 5/9 [===============>------------]  55% 40 secs 517.0 MiB
 In ClassReader.php line 45:
                                                                                                                      
 Impossible to process constructor argument Parameter #1 [ <required> AmastyBaseModelFilesystemProvider $filesystemP  
rovider ] of AmastyBaseHelperDeploy class                                                                            
                                                                                                                      

 In ClassReader.php line 34:
                                                         
Class AmastyBaseModelFilesystemProvider does not exist  
                                                         

In order to start troubleshooting I disabled all third party extensions. I then ran-

rm -rf ./pub/static/*
rm -rf ./var/view_generated/*
rm -rf ./var/page_cache/*
rm -rf ./var/view_preprocessed/*
rm -rf generated/*
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile

But the error will not go away. I am on Magento 2.4.2-p1