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

Error installing Modules on a fresh Laravel 6.0 #839

Closed
ahlechandre opened this issue Sep 23, 2019 · 5 comments
Closed

Error installing Modules on a fresh Laravel 6.0 #839

ahlechandre opened this issue Sep 23, 2019 · 5 comments

Comments

@ahlechandre
Copy link

@ahlechandre ahlechandre commented Sep 23, 2019

Problem

Couldn't use laravel-modules in most recent Laravel version (6.0). Error given in Nwidart\Modules\Json::__construct().

Steps to produce

  1. Create a new Laravel 6.0 project:
$ laravel new project && cd project
  1. Install laravel-modules:
$ composer require nwidart/laravel-modules
  1. Publish modules:
$ php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"
  1. Add to autoload:
{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/"
    }
  }
}
  1. Access any route:
Symfony\Component\Debug\Exception\FatalThrowableError
Argument 2 passed to Nwidart\Modules\Json::__construct() must be an instance of Illuminate\Filesystem\Filesystem or null, instance of Illuminate\Translation\Translator given, called in /php/softsul-crm-web/vendor/nwidart/laravel-modules/src/Module.php on line 227
@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Sep 30, 2019

Hi,

Weird, I can't reproduce this. Can you provide an example project (github or zip) where you have this issue?

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Oct 15, 2019

I'll close this as there hasn't been a reply in a while, feel free to comment if needed.

@nWidart nWidart closed this Oct 15, 2019
@LoganTFox

This comment has been minimized.

Copy link

@LoganTFox LoganTFox commented Feb 14, 2020

I am having the same issue. Everything was working fine but when I upgraded to Laravel 6 the modules don't register.

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Feb 14, 2020

Did you run the migrate command?

@LoganTFox

This comment has been minimized.

Copy link

@LoganTFox LoganTFox commented Feb 14, 2020

Fixed. we ran php artisan module:v6:migrate

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.