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

Unable to resolve NULL driver #73

Closed
Norgul opened this issue Nov 27, 2020 · 2 comments
Closed

Unable to resolve NULL driver #73

Norgul opened this issue Nov 27, 2020 · 2 comments

Comments

@Norgul
Copy link

Norgul commented Nov 27, 2020

Hello,

I can require the package just fine, however when dump-autoload happens I am getting this error:

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   InvalidArgumentException

  Unable to resolve NULL driver for [BeyondCode\Mailbox\MailboxManager].

  at vendor/laravel/framework/src/Illuminate/Support/Manager.php:71
     67▕     {
     68▕         $driver = $driver ?: $this->getDefaultDriver();
     69▕
     70▕         if (is_null($driver)) {
  ➜  71▕             throw new InvalidArgumentException(sprintf(
     72▕                 'Unable to resolve NULL driver for [%s].', static::class
     73▕             ));
     74▕         }
     75▕

      +13 vendor frames
  14  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()

      +5 vendor frames
  20  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

I am using "laravel/framework": "^8.0".

I tried deleting lock files, vendor, clearing cache (wasn't cached initially), nothing happened.

Thanks

@Norgul
Copy link
Author

Norgul commented Nov 30, 2020

My bad, it looks as if my environment was cached.

php artisan optimize:clear, removed vendor and lock, reinstalled, works.

@Norgul Norgul closed this as completed Nov 30, 2020
@yungkeatchan97
Copy link

I found another solution without removing the vendor folder:

  1. Remove the cached file in bootstrap/cache/config.php
  2. Copy vendor/beyondcode/laravel-mailbox/config/mailbox.php to config/mailbox.php
  3. (Optional) Run php artisan config:cache to cache the configs back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants