cancel
Showing results for 
Search instead for 
Did you mean: 

Autoload error: Module 'Magento_Catalog' component already exist

Autoload error: Module 'Magento_Catalog' component already exist

Hello,

 

I copied {magento root}\vendor\magento\module-catalog 's all directory and files inside  "{magento root}\app\code\Magento\Catalog" directory.

 

After that i run command php bin/magento setup:upgrade but it will give me following error and also give the same error while access front end and back end :

 

Error :

 

Autoload error: Module 'Magento_Theme' from 'D:\wamp\www\magento2\app\code\Magento\Theme' has been already defined in 'D:/wamp/www/magento2/vendor/magento/module-theme'.

 

Could you help me to understand what's wrong please?

 

Thank you!

2 REPLIES 2

Re: Autoload error: Module 'Magento_Catalog' component already exist

You cant override directly Magento Catalog module inside app/code folder, You have to first register your module inside registartion.php file inside your module.

 

You cant simply override directly in app/code folder  of core module. In magento 2 if you want to overrider any core module you must have to create module with dependency injection. create di.xml file for any php file override of core module.

 

Thanks.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Autoload error: Module 'Magento_Catalog' component already exist

But,This is already work in magento version 2.0.2 .And then i upgrade it to latest version 2.1.2 and i found this issue. Please help me to solve this.