Class '...SiteModuleService' not found when used inside scout.php I have a custom SiteModule that is used inside scout.php to deliver indexing data to Algolia.
I have followed CraftQuest's tutorial on creating a custom SiteModule for handling the indicies.
The setup works when running locally. But when I run it on my host (Hyperlane), I get the error:
Class 'modules\sitemodule\services\SiteModuleService' not found
I reference the SiteModule in scout.php thus:
'indices'       =&gt; (new \modules\sitemodule\services\SiteModuleService)-&gt;getIndicies()

App.php contains:
return [
    '*' =&gt; [
        'modules' =&gt; [
            'site-module' =&gt; [
                'class' =&gt; \modules\sitemodule\SiteModule::class,
            ],
        ],
        'bootstrap' =&gt; ['site-module'],
    ]
];


Composer version (local/prod): 2.0.12
PHP version local/prod: 7.3.12/7.3.3

What am I doing wrong?
Worked when I added a use-statement to the top of scout.php:
&lt;?php
use modules\sitemodule\services\SitemoduleService as SitemoduleService;

And then:
'indices'       =&gt; (new SitemoduleService)-&gt;getIndicies()