Skip to content

[Bug]: NativePHP/electron install fails #288

Closed
@phikhi

Description

@phikhi

What were you trying to do?

I was trying to install the nativephp/electron package in a freshly created new Laravel 11 app.

composer require nativephp/electron

What happened?

Installation part went fine.
But when running the composer postAutoloadDump scripts, it throws the following exception :

Log :

./composer.json has been updated
Running composer update nativephp/electron
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
  - Locking nativephp/electron (0.6.2)
  - Locking nativephp/laravel (0.5.1)
  - Locking nativephp/php-bin (0.4.0)
  - Locking spatie/laravel-package-tools (1.16.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Installing spatie/laravel-package-tools (1.16.4): Extracting archive
  - Installing nativephp/php-bin (0.4.0): Extracting archive
  - Installing nativephp/laravel (0.5.1): Extracting archive
  - Installing nativephp/electron (0.6.2): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Illuminate\Contracts\Container\BindingResolutionException

  Target [Illuminate\Database\Migrations\MigrationRepositoryInterface] is not instantiable while building [Native\Laravel\Commands\FreshCommand, Illuminate\Database\Migrations\Migrator].

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:1118
    1114▕         } else {
    1115▕             $message = "Target [$concrete] is not instantiable.";
    1116▕         }
    1117▕
  ➜ 1118▕         throw new BindingResolutionException($message);
    1119▕     }
    1120▕
    1121▕     /**
    1122▕      * Throw an exception for an unresolvable primitive.

      +27 vendor frames

  28  artisan:13
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))

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

How to reproduce the bug

  1. Install a new Laravel 11 app
  2. run composer require nativephp/electron

Package Versions

0.6.2

PHP Version

8.3.6

Laravel Version

11.6.0

Node Version

21.7.3

Which operating systems have you seen this occur on?

macOS

OS version

macOS 14.4.1 (23E224)

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions