I'm trying to remove a few modules located inside the vendor folder. If i remove them manually it throws an error on the frontend.
Warning: require(/srv/public_html/vendor/composer/../amzn/amazon-pay-and-login-with-amazon-core-module/registration.php): failed to open stream: No such file or directory in /srv/public_html/vendor/composer/autoload_real.php on line 70
Fatal error: require(): Failed opening required '/srv/public_html/vendor/composer/../amzn/amazon-pay-and-login-with-amazon-core-module/registration.php' (include_path='/srv/public_html/vendor/magento/zendframework1/library:.:/usr/local/lib/php') in /srv/public_html/vendor/composer/autoload_real.php on line 70
Additionally, if I try to remove it using composer (which i thought all modules in vendor were composer installed) i get an error in terminal.
composer remove Amazon/Amazon_Core
amazon/amazon_core is not required in your composer.json and has not been removed
Package "amazon/amazon_core" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package amasty/shopby-root is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
The module/modules i'm trying to remove are the Amazon modules show above in the command line output.
Any help would be greatly appreciated. Thank you.
Best Answer
You can not remove any module directly.
To remove or disable any module from Magento you need to follow some syntax.
Open file Below
Find your Module Name and you can disable module using "0".for Enable "1".
If you remove permanently then delete entry from database and delete module from directory.
To delete module from database find below table from phpmyadmin.
Remove your module entry from 'setup_module' table.
Apply command in terminal
Your module will remove permanently.