Closed Mike-Hawwke closed 6 months ago
That's strange, kindly show me the exact command that you ran and you modules structure. Also, let me know if you published the module's configs or not, for ease of reproduction.
the command composer require coolsam/modules php artisan vendor:publish --tag="modules-config" php artisan module:make Document php artisan module:filament:install Document php artisan module:make:filament-resource name model Document
I only have this module at the moment and I stopped at the step where I generate my resource
I am attaching a screen of the config file of your plugin and the error
I see. Just curious, did you go through the following process? This module depends on nwidart/laravel-modules being configured and working properly. If you didn't go through its documentation, you might have missed a step which ensures modules are auto-discovered by the parent app. I am specifically suspecting this part of the documetation:
the extra is in the composer.json (see screen)
I am afraid I cannot reproduce the error, I even created an app from scratch just to try and reproduce, but it is working fine. However, I noticed from your screenshot that you are using windows. I don't have a windows machine and I always develop on Linux, so it is possible that this bug occurs on Windows. Can someone else confirm this?
Can you give me access to this project to see the differences between yours and mine?
I didn't push it to a repo yet. However, I wrote a test to check the convertPathToNamespace
method which seems to be the cause of your failure, and the test is passing on linux but failing on windows, so I can almost certainly confirm that this is a bug with the function on the windows platform.
Let me attempt a fix and update you.
All Tests now give a good indicator. Please try v4.0.3 and report if it fixes your issue. This is a windows directory separator related issue.
Thank you for your intervention
After udpate of the module I carried out the commands
php artisan module:make Document I first had an error at the same step but it was different and referred to a problem with Nwidart
I did some research and came across this https://github.com/nWidart/laravel-modules/issues/4
So I applied the modification to config/models.php in the generator
The error disappeared so I performed the second command
php artisan module:filament:install Document
A second error has occurred https://flareapp.io/share/x7XaAzY5
I will share my progress with you if I find the reason
When trying to create the resource I got this error (see screen)
I wonder while searching there I came across getModulePlugins
This one also contains a path, possible that the problem is linked to Windows as above?
When trying to create the resource I got this error (see screen)
I wonder while searching there I came across getModulePlugins
This one also contains a path, possible that the problem is linked to Windows as above?
It is definitely a bug only with windows, my methods are mixing up DIRECTORY SEPARATORS. I think I will have to setup a dev environment on Windows so that I can re-test the entire package to ensure each command works on windows.
I am getting same error on MacOS 14.3.1 for filament-modules:4.0.3
, when plugins are registered by ModulesPlugin::make()
, it throws error. My module from nWidart/laravel-modules is working fine if ModulesPlugin::make()
is NOT called
everything worked when using filament-modules:4.0.2
Error:
Class "Modules\Consents\app\Filament\ConsentsPlugin" not found
at vendor/coolsam/modules/src/ModulesPlugin.php:22
18▕ $panel
19▕ ->topNavigation(config('filament-modules.clusters.enabled', false) && config('filament-modules.clusters.use-top-navigation', false));
20▕ $plugins = $this->getModulePlugins();
21▕ foreach ($plugins as $modulePlugin) {
➜ 22▕ $panel->plugin($modulePlugin::make());
23▕ }
24▕ }
25▕
26▕ public function boot(Panel $panel): void
+2 vendor frames
3 app/Providers/Filament/SupervisorPanelProvider.php:81
Filament\Panel::plugins()
+35 vendor frames
39 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Filament\FilamentServiceProvider))
Please try v4.0.4 and confirm to me that it fixes the issue. Thanks.
Working Now. Thanks
Thanks for the feedback @thexaib. If you experience any other issues, don't hesitate to post them.
Hi @coolsam726 ,
I still have problems with your code
For reasons of simplicity I took a server directly and did the installation on it But I still end up with the same kind of error
I don't understand where the problem comes from
Thank you for your help
I can't solve the problem, can you help me @coolsam726 ?
Here's where I'm stuck
I am now on server When I do the installation no problem I create my module but when I want to install it I get this error that appears
@Mike-Hawwke Do you mind sharing a public repo of your code so that I can reproduce the error and try to help?
Closing for now till I hear back from you.
What happened?
Hello,
I have installed your plugin in my Filament v3 (Laravel 11) installation. When I do -> php artisan module:make:filament-resource (Document) and I generate the resource, I get an error that appears:
Class "Modules/Document/Providers/DocumentServiceProvider" not found
If I move the provider folder to the root of the plugin folder, it works.
But the new resource does not appear in the Filament menus after generating the model and migration.
thx
How to reproduce the bug
Basic installation with latest version of laravel and module follow the installation steps
Package Version
v4.x
PHP Version
8.2
Laravel Version
11
Which operating systems does with happen with?
No response
Notes
No response