沃梦达 / 编程问答 / php问题 / 正文

无法在laravel 8上安装laravel/jetstream

Failed to install laravel/jetstream on laravel 8(无法在laravel 8上安装laravel/jetstream)

本文介绍了无法在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不起作用 已尝试清除缓存,但仍不起作用。

推荐答案

取消缓存您的路由,然后重试。


  1. 从Composer中删除Jetstream

    composer remove laravel/jetstream
    
  2. 那么您应该能够使用

    缓存您的路由
     php artisan route:cache
    
  3. 然后安装JetStream

     composer require laravel/jetstream
    

这篇关于无法在laravel 8上安装laravel/jetstream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:无法在laravel 8上安装laravel/jetstream

基础教程推荐