Laravel PackageManifest.php第131行:未定义的索引:名称 [英] Laravel PackageManifest.php line 131: Undefined index: name

查看:80
本文介绍了Laravel PackageManifest.php第131行:未定义的索引:名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用以下命令更新了作曲家:

I updated the composer with this command:

composer self-update

它已更新至版本2.0.4.然后,当我尝试使用以下方式启动Laravel项目时:

It was updated to version 2.0.4. Then when I tried to launch my Laravel project using:

php artisan serve

我收到此错误:

In PackageManifest.php line 131:

 Undefined index: name

我尝试使用以下方法恢复作曲家的旧版本:

I tried getting back to the old version of the composer with this:

composer self-update --rollback

该作曲者已降级至1.9.3版,但此错误无济于事.然后,我使用此命令再次更新了作曲家:

The composer was downgraded to version 1.9.3, but it didn't help with the error. Then I used this command to update the composer again:

composer self-update --stable

并且仍然出现相同的错误.

And still got the same error.

这是PackageManifest.php文件的第131行:

This is the line 131 of the PackageManifest.php file:

return [$this->format($package['name']) => $package['extra']['laravel'] ?? []];

推荐答案

首先,您应在使用 composer self-update 后再次检查版本.然后,您尝试 composer更新.最后,您运行 php artisan serve .

First, you should check again version after using composer self-update. Then, you try composer update. Finally, you run php artisan serve.

这篇关于Laravel PackageManifest.php第131行:未定义的索引:名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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