composer2nix
composer2nix copied to clipboard
Facade not found in composer2nix
Thank for your work! But I have an issue I can't figure out on my own.
I am working at this project and if do (outside of nix):
composer install
Everything works as expected. But when I generate the nix derivation with composer2nix and I do nix-build
, I get this error:
'/nix/store/3mqa49rq48ys6cbvk7lsacj06bp5gvz0-webmozart-assert-6964c76c7804814a842473e0c8fd15bab0f18e25/src/Mixin.php' -> 'webmozart/assert/src/Mixin.php'
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In ProviderRepository.php line 208:
Class 'Facade\Ignition\IgnitionServiceProvider' not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
error: builder for '/nix/store/3yvd0rwqrhxlmz7742lvr36k6clyr8p9-composer-laravel-laravel.drv' failed with exit code 1;
last 10 log lines:
> Generating optimized autoload files
> > Illuminate\Foundation\ComposerScripts::postAutoloadDump
> > @php artisan package:discover --ansi
>
> In ProviderRepository.php line 208:
>
> Class 'Facade\Ignition\IgnitionServiceProvider' not found
>
>
> Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
For full logs, run 'nix log /nix/store/3yvd0rwqrhxlmz7742lvr36k6clyr8p9-composer-laravel-laravel.drv'.
It sounds like a missed dependencies to me be as I said, it looks like it is missed only for composer2nix.
your composer version maybe over 2.x, change composer version to 1.10 ,the error is disappear
I was able to resolve similar issues by moving spatie/laravel-ignition
to "require"
instead of "require-dev"
and re-running composer update && composer2nix