- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Class does not exist during bin/magento setup:install while it's in app/code
Hi everybody,
I'm having issues with a bin/magento setup:install. We have custom modules that we initialise using git submodules. These modules are being put into app/code/<vendor>.
Now I must inform you that we extend the Magento 2 Console to add extra commands and ONLY those modules are giving the errors. If we disable the part in the di.xml that inserts these, everything works just fine.
Image below for the folder structure:
(The ImportCategoryIds.php is the culprit in this case)
Here's the aforementioned file:
Here's the di.xml part where we include it:
And here's the error we get:
If you might have any clue as to why this might be happening, please let me know. I've been stuck on this for a good while.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Class does not exist during bin/magento setup:install while it's in app/code
Hello @daniel_van der velden
There are many incorrect things in your flow :
- Issue 1 : You are using bin/magento setup:install which is used to install Magento setup, if you want to add a module, you must user bin/magento setup:upgrade after placing module in app/code/.
- Issue 2 : Name space for ImportCategoryIds is incorrect, it should be
{VendorName}/{ModuleName}/Console - Issue 3 : Folder structure of module must be compatible with your Module Name in your registration.php in module folder.
if your Module name is : Xlii_Kwintessens
Then your folder structure should be app/code/Xlii/Kwintessens
The error is showing because your file ImportCategoryIds.php is present in 42functions\module-kwintessens\Console\ImportCategoryIds.php, but the system is check inside Xlii\Kwintessens\Console\ImportCategoryIds.php so there is no folder such like Xlii\Kwintessens.
