cancel
Showing results for 
Search instead for 
Did you mean: 

Magento setup:di:compile throwing class does not exist error message

SOLVED

Magento setup:di:compile throwing class does not exist error message

Hi,

 

If anyone can help, greatly appreciated.

 

Any way just ran setup:di:compile and the following error message has been thrown, no ida why! I have checked the app/code/Magento directory and cannot see any directories relating to any Inventory class. I am running Magento community version 2.3.5.

 

Class Magento\InventorySourceDeductionApi\Model\GetSourceItemBySourceCodeAndSku does not exist

 

magento-issue.png

 

Thanks in Advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento setup:di:compile throwing class does not exist error message

Just to wrap things up, following some research I found that the missing inventory modules could be installed via downloading them from Github.

 

The version of Magento I was using required v1.1.6

https://github.com/magento/inventory/tree/1.1.6 .

 

After downloading and extracting the files were uloaded to the app/code/Magento directory.

 

chown -R www-data:www-data to modifiy file permissions after upload then:

 

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento cache:clean

bin/magento cache:flush

 

As I am using the community edition I did not redeploy the static content, but this can be forced: bin/magento setup:static-content:deploy -f

 

Anyway problem solved Smiley Happy

View solution in original post

3 REPLIES 3

Re: Magrnto setup:di:compile throwing class does not exist error message

kindly check if you have this module enabled 

 

php bin/magento module:status Magento_InventorySourceDeductionApi

this module is a part of MSI

 

If you are not using MSI then try disabling all the modules related listed here

 

Kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

 

 

Re: Magento setup:di:compile throwing class does not exist error message

Hi,

 

Thanks for your time...

 

The module you mention does not exist.

 

I tried disabling the modules that exist as part of the MSI, but none of them exist also.

 

Last time I worked on the site and ran setup:di:compile everything ran okay, all I can think is that composer has maybe added a denpendany that does not exis, but I don't think that is the case also!

 

Possibly after I started to install Facebook Pixel.

 

regards

 

Matt

 

Re: Magento setup:di:compile throwing class does not exist error message

Just to wrap things up, following some research I found that the missing inventory modules could be installed via downloading them from Github.

 

The version of Magento I was using required v1.1.6

https://github.com/magento/inventory/tree/1.1.6 .

 

After downloading and extracting the files were uloaded to the app/code/Magento directory.

 

chown -R www-data:www-data to modifiy file permissions after upload then:

 

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento cache:clean

bin/magento cache:flush

 

As I am using the community edition I did not redeploy the static content, but this can be forced: bin/magento setup:static-content:deploy -f

 

Anyway problem solved Smiley Happy

View solution in original post