laravel update报In PackageManifest.php line 122:Undefined index: name 错误的解决办法

用 composer 更新 laravel依赖包时报错

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In PackageManifest.php line 122:

  Undefined index: name


Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

错误提示:
In PackageManifest.php line 122:

Undefined index: name

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

可能是composer.lock中没有记录的第三方扩展,但是已经创建了服务提供者provider等

解决办法

找到

vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php

把116行

$packages = json_decode($this->files->get($path), true);

改成

$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;

然后再

composer update

就可以了

我用了方案1,现在错了:12:42:58.678 跳转登录页成功 at pages/index/index.vue:16 12:43:07.960 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:07.960 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:07.960 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:07.960 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:07.960 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 [JS Framework] Failed to execute the callback function: TypeError: Cannot read property 'left' of null 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.012 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7 12:43:08.013 reportJSException >>>> exception function:__WEEX_CALL_JAVASCRIPT__, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'left' of null at (app-service.js:1701:40) 12:43:08.013 Uncaught TypeError: Cannot read properties of undefined (reading '$') at uni-app-view.umd.js:7
最新发布
07-24
Rebuild started: Project: template *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'Template' assembling startup_stm32f10x_hd.s... compiling core_cm3.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition Libraries\CMSIS\core_cm3.c: 1 warning, 0 errors compiling led.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition APP\LED\led.c: 1 warning, 0 errors compiling main.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition user\main.c(87): warning: #223-D: function "Delay" declared implicitly Delay(1000000); // 简易延时约1秒 user\main.c(92): warning: #159-D: declaration is incompatible with previous "Delay" (declared at line 87) void Delay(__IO uint32_t nCount) { user\main.c: 3 warnings, 0 errors compiling stm32f10x_it.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition user\stm32f10x_it.c: 1 warning, 0 errors compiling system_stm32f10x.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition Libraries\CMSIS\system_stm32f10x.c: 1 warning, 0 errors compiling stm32f10x_gpio.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c: 1 warning, 0 errors compiling stm32f10x_rcc.c... "no source": Warning: #2774-D: '=' assumed following macro name "USE_STDPERIPH_DRIVER" in command-line definition Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c: 1 warning, 0 errors linking... .\Objects\template.axf: Error: L6218E: Undefined symbol USART_Cmd (referred from main_7.o). .\Objects\template.axf: Error: L6218E: Undefined symbol USART_GetFlagStatus (referred from main_7.o). .\Objects\template.axf: Error: L6218E: Undefined symbol USART_Init (referred from main_7.o). .\Objects\template.axf: Error: L6218E: Undefined symbol USART_SendData (referred from main_7.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 4 error messages. ".\Objects\template.axf" - 4 Error(s), 9 Warning(s). Target not created. Build Time Elapsed: 00:00:00
06-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

phpgolife

您的支持是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值