nova-trumbowyg icon indicating copy to clipboard operation
nova-trumbowyg copied to clipboard

Class 'Laravel\Nova\Nova' not found when installing via composer

Open erwinangeles opened this issue 3 years ago • 2 comments

Getting error when installing on Laravel Framework 6.20.24

I do composer require johnathan/nova-trumbowyg

I get the error Class 'Laravel\Nova\Nova' not found

Can't seem to figure what that class is for?

` - Installing johnathan/nova-trumbowyg (1.0.12): Extracting archive Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi

Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Laravel\Nova\Nova' not found

at /Users/erwin/laravelproject/vendor/johnathan/nova-trumbowyg/src/FieldServiceProvider.php:22 18| $this->publishes([ 19| DIR.'/../fonts/vendor' => public_path('fonts/vendor'), 20| ], 'public'); 21|

22| Nova::serving(function (ServingNova $event) { 23| Nova::script('nova-trumbowyg', DIR.'/../dist/js/field.js'); 24| Nova::style('nova-trumbowyg', DIR.'/../dist/css/field.css'); 25| }); 26| }

Exception trace:

1 Johnathan\NovaTrumbowyg\FieldServiceProvider::boot() /Users/erwin/laravelproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36

2 Illuminate\Container\BoundMethod::Illuminate\Container{closure}() /Users/erwin/laravelproject/vendor/laravel/framework/src/Illuminate/Container/Util.php:37

Please use the argument -v to see more details. Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content. `

erwinangeles avatar Apr 22 '21 15:04 erwinangeles

Hey @erwinangeles Which version of Nova are you using?

Johnathan avatar Apr 26 '21 15:04 Johnathan

I have the same problem. Any solution?

dpto-informatica avatar Jun 13 '24 12:06 dpto-informatica