无法在laravel 8上安装laravel/jetstream
通过Composer安装JetStream后composer require laravel/jetstream
然后突然出现ErrorException,表示没有这样的文件或目录。
Writing lock file
Generating optimized autoload files
> IlluminateFoundationComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
ErrorException
require(F:laravelApps est_projvendorlaraveljetstreamsrc/../routes/.php): failed to open stream: No such file or directory
at F:laravelApps est_projvendorlaravelframeworksrcIlluminateSupportServiceProvider.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 est_projvendorlaravelframeworksrcIlluminateSupportServiceProvider.php:144
require()
2 F:laravelApps est_projvendorlaraveljetstreamsrcJetstreamServiceProvider.php:172
IlluminateSupportServiceProvider::loadRoutesFrom("F:laravelApps est_projvendorlaraveljetstreamsrc/../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.
我使用此指导原则进行安装。 https://jetstream.laravel.com/1.x/installation.html
我尝试删除供应商,但运行composer update
不起作用
已尝试清除缓存,但仍不起作用。
解决方案
取消缓存您的路由,然后重试。
从Composer中删除Jetstream
composer remove laravel/jetstream
那么您应该能够使用
缓存您的路由php artisan route:cache
然后安装JetStream
composer require laravel/jetstream
相关文章