Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error up install with #79

Closed
jeremykenedy opened this issue Jan 24, 2024 · 6 comments
Closed

[Bug]: Error up install with #79

jeremykenedy opened this issue Jan 24, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jeremykenedy
Copy link

jeremykenedy commented Jan 24, 2024

What happened?

On a fresh install of Laravel 10 upon running composer require lara-zeus/wind after pulling in the dependencies of this package it fails down the line with the package filament/filament

Here is the error:


...

  - Installing openspout/openspout (v4.23.0): Extracting archive
  - Installing league/csv (9.11.0): Extracting archive
  - Installing filament/actions (v3.2.11): Extracting archive
  - Installing filament/notifications (v3.2.11): Extracting archive
  - Installing filament/infolists (v3.2.11): Extracting archive
  - Installing filament/forms (v3.2.11): Extracting archive
  - Installing filament/tables (v3.2.11): Extracting archive
  - Installing danharrin/livewire-rate-limiting (v1.3.0): Extracting archive
  - Installing filament/filament (v3.2.11): Extracting archive
  - Installing spatie/laravel-translatable (6.5.5): Extracting archive
  - Installing filament/spatie-laravel-translatable-plugin (v3.2.11): Extracting archive
  - Installing lara-zeus/core (v3.1.1): Extracting archive
  - Installing lara-zeus/wind (v3.2.0): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Call to a member function hasPlugin() on null

  at vendor/filament/filament/src/FilamentManager.php:565
    561▕     }
    562▕ 
    563▕     public function hasPlugin(string $id): bool
    564▕     {
  ➜ 565▕         return $this->getCurrentPanel()->hasPlugin($id);
    566▕     }
    567▕ 
    568▕     public function hasProfile(): bool
    569▕     {

      +10 vendor frames 

  11  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(LaraZeus\Wind\WindServiceProvider))
      +5 vendor frames 

  17  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

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

How to reproduce the bug

From terminal run

  1. laravel new laravel
  2. cd laravel
  3. composer require lara-zeus/wind

Package Version

v3.2.0

PHP Version

8.3.0

Laravel Version

10.0.0

Which operating systems does with happen with?

macOS

Notes

 ~/sites/laraform/ composer show lara-zeus/wind
name     : lara-zeus/wind
descrip. : Zeus Wind is simple contact form for your website with easy to use dashboard, works as a plugin for Filament Admin Panel
keywords : Forms, contact, filamentphp, form, lara-zeus, laravel, mailing
versions : * v3.2.0
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://larazeus.com/wind
source   : [git] https://github.com/lara-zeus/wind.git 5ee23b2dad23a2763da3908c938f997b32cb5880
dist     : [zip] https://api.github.com/repos/lara-zeus/wind/zipball/5ee23b2dad23a2763da3908c938f997b32cb5880 5ee23b2dad23a2763da3908c938f997b32cb5880
path     : /Users/jeremykenedy/sites/laraform/vendor/lara-zeus/wind
names    : lara-zeus/wind

support
issues : https://github.com/lara-zeus/wind/issues
source : https://github.com/lara-zeus/wind

autoload
psr-4
LaraZeus\Wind\ => src

requires
lara-zeus/core ^3.1
php ^8.1

requires (dev)
larastan/larastan ^2.2
laravel/pint ^1.0
nunomaduro/collision ^7.0
orchestra/testbench ^8.0
pestphp/pest ^2.0
pestphp/pest-plugin-laravel ^2.0
pestphp/pest-plugin-livewire 2.x-dev
phpstan/extension-installer ^1.1
phpstan/phpstan ^1.10
phpstan/phpstan-deprecation-rules ^1.0
phpstan/phpstan-phpunit ^1.0
phpunit/phpunit ^10.1

Out the box Laravel composer.json dependencies not modified in any way:

    "require": {
        "php": "^8.1",
        "guzzlehttp/guzzle": "^7.2",
        "lara-zeus/wind": "*",
        "laravel/framework": "^10.10",
        "laravel/jetstream": "^4.2",
        "laravel/sanctum": "^3.3",
        "laravel/tinker": "^2.8",
        "livewire/livewire": "^3.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.18",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.1",
        "spatie/laravel-ignition": "^2.0"
    },

Also attempted with no presets:

    "require": {
        "php": "^8.1",
        "guzzlehttp/guzzle": "^7.2",
        "lara-zeus/wind": "*",
        "laravel/framework": "^10.10",
        "laravel/sanctum": "^3.3",
        "laravel/tinker": "^2.8"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.18",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.1",
        "spatie/laravel-ignition": "^2.0"
    },

I see in issue #69 that the fix is to run composer require filament/filament:"^3.0-stable" -W, since this is an issue out the box with Laravel and this package it should probably be notated in the README.md and docs as a known issue and a command to run pre composer require lara-zeus/wind

@jeremykenedy jeremykenedy added the bug Something isn't working label Jan 24, 2024
@atmonshi
Copy link
Member

have you installed filament first? :)

all zeus packages depends on filament, you have to install it first and set it up, then install wind

@jeremykenedy
Copy link
Author

jeremykenedy commented Jan 24, 2024

I was in the wrong directory,

It still failed.

@jeremykenedy
Copy link
Author

Here are the steps:

  1. laravel new laravel
  2. cd laravel
  3. composer require filament/filament:"^3.0-stable" -W
  4. composer require lara-zeus/wind

Error:

 ~/sites/ cd laraform                    
 ~/sites/laraform/ composer require filament/filament:"^3.0-stable" -W
./composer.json has been updated
Running composer update filament/filament --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 29 installs, 0 updates, 0 removals
  - Locking anourvalar/eloquent-serialize (1.2.17)
  - Locking blade-ui-kit/blade-heroicons (2.2.1)
  - Locking blade-ui-kit/blade-icons (1.5.3)
  - Locking danharrin/date-format-converter (v0.3.0)
  - Locking danharrin/livewire-rate-limiting (v1.3.0)
  - Locking doctrine/cache (2.2.0)
  - Locking doctrine/dbal (3.7.3)
  - Locking doctrine/deprecations (1.1.2)
  - Locking doctrine/event-manager (2.0.0)
  - Locking filament/actions (v3.2.11)
  - Locking filament/filament (v3.2.11)
  - Locking filament/forms (v3.2.11)
  - Locking filament/infolists (v3.2.11)
  - Locking filament/notifications (v3.2.11)
  - Locking filament/support (v3.2.11)
  - Locking filament/tables (v3.2.11)
  - Locking filament/widgets (v3.2.11)
  - Locking kirschbaum-development/eloquent-power-joins (3.4.0)
  - Locking league/csv (9.11.0)
  - Locking league/uri (7.4.0)
  - Locking league/uri-interfaces (7.4.0)
  - Locking masterminds/html5 (2.8.1)
  - Locking openspout/openspout (v4.23.0)
  - Locking psr/cache (3.0.0)
  - Locking ryangjchandler/blade-capture-directive (v0.3.0)
  - Locking spatie/color (1.5.3)
  - Locking spatie/invade (2.0.0)
  - Locking spatie/laravel-package-tools (1.16.2)
  - Locking symfony/html-sanitizer (v6.4.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 29 installs, 0 updates, 0 removals
  - Installing anourvalar/eloquent-serialize (1.2.17): Extracting archive
  - Installing blade-ui-kit/blade-icons (1.5.3): Extracting archive
  - Installing blade-ui-kit/blade-heroicons (2.2.1): Extracting archive
  - Installing danharrin/date-format-converter (v0.3.0): Extracting archive
  - Installing psr/cache (3.0.0): Extracting archive
  - Installing doctrine/event-manager (2.0.0): Extracting archive
  - Installing doctrine/deprecations (1.1.2): Extracting archive
  - Installing doctrine/cache (2.2.0): Extracting archive
  - Installing doctrine/dbal (3.7.3): Extracting archive
  - Installing spatie/laravel-package-tools (1.16.2): Extracting archive
  - Installing masterminds/html5 (2.8.1): Extracting archive
  - Installing league/uri-interfaces (7.4.0): Extracting archive
  - Installing league/uri (7.4.0): Extracting archive
  - Installing symfony/html-sanitizer (v6.4.0): Extracting archive
  - Installing spatie/invade (2.0.0): Extracting archive
  - Installing spatie/color (1.5.3): Extracting archive
  - Installing ryangjchandler/blade-capture-directive (v0.3.0): Extracting archive
  - Installing filament/support (v3.2.11): Extracting archive
  - Installing filament/widgets (v3.2.11): Extracting archive
  - Installing kirschbaum-development/eloquent-power-joins (3.4.0): Extracting archive
  - Installing openspout/openspout (v4.23.0): Extracting archive
  - Installing league/csv (9.11.0): Extracting archive
  - Installing filament/actions (v3.2.11): Extracting archive
  - Installing filament/notifications (v3.2.11): Extracting archive
  - Installing filament/infolists (v3.2.11): Extracting archive
  - Installing filament/forms (v3.2.11): Extracting archive
  - Installing filament/tables (v3.2.11): Extracting archive
  - Installing danharrin/livewire-rate-limiting (v1.3.0): Extracting archive
  - Installing filament/filament (v3.2.11): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.  

  anourvalar/eloquent-serialize ................................................................................. DONE
  blade-ui-kit/blade-heroicons .................................................................................. DONE
  blade-ui-kit/blade-icons ...................................................................................... DONE
  filament/actions .............................................................................................. DONE
  filament/filament ............................................................................................. DONE
  filament/forms ................................................................................................ DONE
  filament/infolists ............................................................................................ DONE
  filament/notifications ........................................................................................ DONE
  filament/support .............................................................................................. DONE
  filament/tables ............................................................................................... DONE
  filament/widgets .............................................................................................. DONE
  kirschbaum-development/eloquent-power-joins ................................................................... DONE
  laravel/fortify ............................................................................................... DONE
  laravel/jetstream ............................................................................................. DONE
  laravel/sail .................................................................................................. DONE
  laravel/sanctum ............................................................................................... DONE
  laravel/tinker ................................................................................................ DONE
  livewire/livewire ............................................................................................. DONE
  nesbot/carbon ................................................................................................. DONE
  nunomaduro/collision .......................................................................................... DONE
  nunomaduro/termwind ........................................................................................... DONE
  ryangjchandler/blade-capture-directive ........................................................................ DONE
  spatie/laravel-ignition ....................................................................................... DONE

101 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  No publishable resources for tag [laravel-assets].  

No security vulnerability advisories found
 ~/sites/laraform/ composer require lara-zeus/wind                    
./composer.json has been updated
Running composer update lara-zeus/wind
Loading composer repositories with package information
Updating dependencies
Lock file operations: 7 installs, 0 updates, 0 removals
  - Locking archtechx/laravel-seo (v0.7.0)
  - Locking calebporzio/sushi (v2.4.5)
  - Locking codeat3/blade-iconpark (1.5.1)
  - Locking filament/spatie-laravel-translatable-plugin (v3.2.11)
  - Locking lara-zeus/core (v3.1.1)
  - Locking lara-zeus/wind (v3.2.0)
  - Locking spatie/laravel-translatable (6.5.5)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
  - Installing archtechx/laravel-seo (v0.7.0): Extracting archive
  - Installing calebporzio/sushi (v2.4.5): Extracting archive
  - Installing codeat3/blade-iconpark (1.5.1): Extracting archive
  - Installing spatie/laravel-translatable (6.5.5): Extracting archive
  - Installing filament/spatie-laravel-translatable-plugin (v3.2.11): Extracting archive
  - Installing lara-zeus/core (v3.1.1): Extracting archive
  - Installing lara-zeus/wind (v3.2.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Call to a member function hasPlugin() on null

  at vendor/filament/filament/src/FilamentManager.php:565
    561▕     }
    562▕ 
    563▕     public function hasPlugin(string $id): bool
    564▕     {
  ➜ 565▕         return $this->getCurrentPanel()->hasPlugin($id);
    566▕     }
    567▕ 
    568▕     public function hasProfile(): bool
    569▕     {

      +10 vendor frames 

  11  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(LaraZeus\Wind\WindServiceProvider))
      +5 vendor frames 

  17  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

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

@jeremykenedy
Copy link
Author

Note in my local used directory laraform, not laravel

@atmonshi
Copy link
Member

from your composer output wind is installed:

- Installing lara-zeus/wind (v3.2.0): Extracting archive

and the error
Call to a member function hasPlugin() on null

because there is no panel provider in your app

you have to setup filament not just install it with composer
https://filamentphp.com/docs/3.x/panels/installation#installation

run this

php artisan filament:install --panels

after that you can run composer install and it should be all good

@jeremykenedy
Copy link
Author

It worked with:

  1. laravel new laravel
  2. cd laravel
  3. composer require filament/filament:"^3.2" -W
  4. php artisan filament:install --panels
  5. composer require lara-zeus/wind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants