- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Thanks in Advance!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento setup:di:compile throwing class does not exist error message
Overcome this compilation error you first need to check that all MSI Modules are installed.
you can easily check on this file app/etc/config.php
'Magento_Inventory' => 1,
'Magento_InventoryAdminUi' => 1,
'Magento_InventoryAdvancedCheckout' => 1,
'Magento_InventoryApi' => 1,
'Magento_InventoryBundleProduct' => 1,
'Magento_InventoryBundleProductAdminUi' => 1,
'Magento_InventoryCatalog' => 1,
'Magento_InventorySales' => 1,
'Magento_InventoryCatalogAdminUi' => 1,
'Magento_InventoryCatalogApi' => 1,
'Magento_InventoryCatalogSearch' => 1,
'Magento_InventoryConfigurableProduct' => 1,
'Magento_InventoryConfigurableProductAdminUi' => 1,
'Magento_InventoryConfigurableProductIndexer' => 1,
'Magento_InventoryConfiguration' => 1,
'Magento_InventoryConfigurationApi' => 1,
'Magento_InventoryDistanceBasedSourceSelection' => 1,
'Magento_InventoryDistanceBasedSourceSelectionAdminUi' => 1,
'Magento_InventoryDistanceBasedSourceSelectionApi' => 1,
'Magento_InventoryElasticsearch' => 1,
'Magento_InventoryExportStockApi' => 1,
'Magento_InventoryIndexer' => 1,
'Magento_InventorySalesApi' => 1,
'Magento_InventoryGroupedProduct' => 1,
'Magento_InventoryGroupedProductAdminUi' => 1,
'Magento_InventoryGroupedProductIndexer' => 1,
'Magento_InventoryImportExport' => 1,
'Magento_InventoryCache' => 1,
'Magento_InventoryLowQuantityNotification' => 1,
'Magento_InventoryLowQuantityNotificationApi' => 1,
'Magento_InventoryMultiDimensionalIndexerApi' => 1,
'Magento_InventoryProductAlert' => 1,
'Magento_InventoryRequisitionList' => 1,
'Magento_InventoryReservations' => 1,
'Magento_InventoryReservationCli' => 1,
'Magento_InventoryReservationsApi' => 1,
'Magento_InventoryExportStock' => 1,
'Magento_InventorySalesAdminUi' => 1,
'Magento_InventorySalesFrontendUi' => 1,
'Magento_InventorySetupFixtureGenerator' => 1,
'Magento_InventoryShipping' => 1,
'Magento_InventorySourceDeductionApi' => 1,
'Magento_InventorySourceSelection' => 1,
'Magento_InventorySourceSelectionApi' => 1,
'Magento_InventoryLowQuantityNotificationAdminUi' => 1,
'Magento_InventoryShippingAdminUi' => 1,
'Magento_InventoryGraphQl' => 1,
the above compilation error related to this magento module Magento_InventorySourceDeductionApi
so you can check the status of this module it installs or not using the below cmd command
bin/magento module:status Magento_InventorySourceDeductionApi
if its disable then run
php bin/magento module:enable Magento_InventorySourceDeductionApi
after enabling this module I hope your compilation issue resolved. Thanks