#Problems in Laravel Cloud (Nwidart Laravel Modules)

17 messages · Page 1 of 1 (latest)

frosty zodiac
#

Hi guys, i'am a new member here and maybe any person can help me with my problems when deploying my project in Laravel Cloud. So, the problems is i try to deploying my Laravel project into Laravel Cloud, and i have an error like in my image, or like this

> @php artisan package:discover --ansi
{"message":"Module [Sales] does not exist!","context":{"exception":{"class":"Nwidart\\Modules\\Exceptions\\ModuleNotFoundException","message":"Module [Sales] does not exist!","code":0,"file":"/var/www/html/vendor/nwidart/laravel-modules/src/FileRepository.php:290"}},"level":400,"level_name":"ERROR","channel":"local","datetime":"2025-03-06T13:52:48.372192+00:00","extra":{}}

In FileRepository.php line 290:
                                  
  Module [Sales] does not exist!  
                                  

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

For modules package, i used nwidart/laravel-modules. Maybe any person can help me with this?

patent thorn
#

That just seems like an error from the package you're using, not caused by Cloud.

snow marlin
frosty zodiac
snow marlin
patent thorn
snow marlin
#

Some file erros do not appear on local development since we do not optimize it by caching

#

So composer/php do not resolve the error

#

But when you run commands like composer du that generates the autoload

#

it show the error warning

#

i could be wrong, but this is my guess

frosty zodiac
frosty zodiac
snow marlin
#

at the imports and see how the Module sales is being called

#

after that go to the Sales File and check their namespace

frosty zodiac
# snow marlin Go to your FileRepository

I found a way to solve this problem, but it's only changed the dir name to Modules (default by package). Before it, i used modules name, but i still don't know how to solve this problem when i used this dir name.