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.
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.
Laravel 8 requires PHP 7.3+ or above so you need this version or the latest version of PHP installed on your system.
Remove jetstream from composer
composer remove laravel/jetstream
Then you should be able to cache your routes using
php artisan route:cache
Then install jetstream
composer require laravel/jetstream
UPDATE:
You just need to run php artisan route:cache
https://github.com/laravel/jetstream/issues/186
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With