Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to install laravel/jetstream on laravel 8

after the installation of jetstream via composer composer require laravel/jetstream then suddenly get an ErrorException that there's no such file or directory.

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

   ErrorException

  require(F:\laravelApps\test_proj\vendor\laravel\jetstream\src/../routes/.php): failed to open stream: No such file or directory

  at F:\laravelApps\test_proj\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:144
    140▕      */
    141▕     protected function loadRoutesFrom($path)
    142▕     {
    143▕         if (! ($this->app instanceof CachesRoutes && $this->app->routesAreCached())) {
  ➜ 144▕             require $path;
    145▕         }
    146▕     }
    147▕
    148▕     /**

  1   F:\laravelApps\test_proj\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:144
      require()

  2   F:\laravelApps\test_proj\vendor\laravel\jetstream\src\JetstreamServiceProvider.php:172
      Illuminate\Support\ServiceProvider::loadRoutesFrom("F:\laravelApps\test_proj\vendor\laravel\jetstream\src/../routes/.php")
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

I use this guideline for the installation. https://jetstream.laravel.com/1.x/installation.html

I tried to delete the vendor and run composer update doesn't work tried to cache clear but still doesn't work.

like image 886
VLDCNDN Avatar asked Sep 14 '20 16:09

VLDCNDN


People also ask

What is Laravel 8 Jetstream?

Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum , and optional team management features. Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding.

Does Laravel 8 support php7?

Laravel 8 requires PHP 7.3+ or above so you need this version or the latest version of PHP installed on your system.


Video Answer


2 Answers

Uncache your routes and try again.


  1. Remove jetstream from composer

    composer remove laravel/jetstream
    
  2. Then you should be able to cache your routes using

     php artisan route:cache
    
  3. Then install jetstream

     composer require laravel/jetstream
    
like image 170
muhive Avatar answered Oct 05 '22 22:10

muhive


UPDATE:

You just need to run php artisan route:cache

https://github.com/laravel/jetstream/issues/186

like image 32
VLDCNDN Avatar answered Oct 05 '22 22:10

VLDCNDN