Laravel Telescope无法打开流:没有这样的文件或目录TelescopeServiceProvider.php [英] Laravel Telescope Failed to open stream: no such file or directory TelescopeServiceProvider.php

查看:141
本文介绍了Laravel Telescope无法打开流:没有这样的文件或目录TelescopeServiceProvider.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Laravels官方文档中的 Telescope软件包,前两个步骤:

I am trying to use the Telescope package from Laravels official documentation and I followed the first 2 steps:

composer require laravel/telescope

php artisan telescope:install

在安装前一切正常.我得到了错误:

Everything went fine in my command line untill the install. I got the error:

ErrorException:file_get_contents(path \ app \ Providers/TelescopeServiceProvider.php:无法打开流:在以下位置没有此类文件或目录:vendor \ laravel \ telescope \ src \ Console \ InstallCommand.php

ErrorException : file_get_contents(path\app\Providers/TelescopeServiceProvider.php: failed to open stream: No such file or directory at: vendor\laravel\telescope\src\Console\InstallCommand.php

当然,我用谷歌搜索了这个问题并找到了this,然后我检查了查看我的提供者的文件夹是否存在.它确实存在,并且确实不存在 TelescopeServiceProvider.php .我尝试再次运行命令 php artisan telescope:install ,它向我提供了消息:

So, of course, I googled the issue and found this and I checked to see if my provider's folder exists. It does and indeed the TelescopeServiceProvider.php is not there. I tried to run the command php artisan telescope:install again and it provided me the message:

望远镜支架成功安装.

Telescope scaffolding installed successfully.

我以为很奇怪,但是可以,我进入了文档的下一步:

which I thought was strange but ok, I went to the next step of the documentation:

  • 安装望远镜后,还应该运行 migrate 命令: php artisan migration

所以我运行了该命令,并得到了消息:

So I ran that command and I got the message:

没有什么可以迁移的.

Nothing to migrate.

因此,显然这不正确.我检查了假货"后如果TelescopeServiceProvider现在存在,但仍然不存在,则安装成功的消息.

So obviously this didn't go right. I checked after the "fake" installed successfully message if the TelescopeServiceProvider exists now but it still didn't.

我做错了什么以及如何解决此问题?

What did I do wrong and how do I fix this issue?

推荐答案

尝试更新望远镜,

composer update --prefer-source

尝试删除Telescope,然后重新安装软件包,因为安装似乎破坏了软件包:

Try removing Telescope and then reinstalling the package as the installation seems to have broken the package:

composer remove laravel/telescope
composer require laravel/telescope

尝试:

composer dump-autoload

或:

artisan cache:clear

在更新或更改 composer.json 以刷新所有内容之后.

after you update or make changes to composer.json to refresh everything.

这篇关于Laravel Telescope无法打开流:没有这样的文件或目录TelescopeServiceProvider.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆