[英]Laravel Telescope Failed to open stream: no such file or directory TelescopeServiceProvider.php
I am trying to use the Telescope package from Laravels official documentation and I followed the first 2 steps:我正在尝试使用 Laravel 官方文档中的 Telescope package ,我遵循了前两个步骤:
composer require laravel/telescope
and和
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: failed to open stream: No such file or directory at: 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
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.它确实存在,而且
TelescopeServiceProvider.php
确实不存在。 I tried to run the command php artisan telescope:install
again and it provided me the message:我尝试再次运行命令
php artisan telescope:install
并为我提供了以下消息:
Telescope scaffolding installed successfully.
望远镜脚手架安装成功。
which I thought was strange but ok, I went to the next step of the documentation:我认为这很奇怪,但没关系,我进入了文档的下一步:
migrate
command: php artisan migrate
migrate
命令: php artisan migrate
So I ran that command and I got the message:所以我运行了那个命令,我得到了消息:
Nothing to migrate.
没有什么可以迁移的。
So obviously this didn't go right.所以显然这不是 go 正确的。 I checked after the "fake" installed successfully message if the TelescopeServiceProvider exists now but it still didn't.
如果 TelescopeServiceProvider 现在存在,我在“假”安装成功消息后检查了它,但它仍然不存在。
What did I do wrong and how do I fix this issue?我做错了什么,我该如何解决这个问题?
Try update Telescope,尝试更新望远镜,
composer update --prefer-source
Try removing Telescope and then reinstalling the package as the installation seems to have broken the package:尝试移除 Telescope,然后重新安装 package,因为安装似乎破坏了 package:
composer remove laravel/telescope
composer require laravel/telescope
Try:尝试:
composer dump-autoload
or:或者:
artisan cache:clear
after you update or make changes to composer.json
to refresh everything.在您更新或更改
composer.json
以刷新所有内容后。
Per the Telescope Github Issues根据望远镜 Github 问题
Telescope is not ready for Laravel 6 yet.望远镜还没有为 Laravel 6 做好准备。 Many people are having this same issue.
很多人都有同样的问题。 The solution is to look at this issue.
解决办法就是看这个问题。 Although it is a workaround, not a solution.
虽然这是一种解决方法,但不是解决方案。
use composer dump-autoload使用作曲家转储自动加载
and:和:
artisan cache:clear工匠缓存:清除
but但
install composer require brick/math安装作曲家需要砖/数学
its work这是工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.