使用的laravel框架,直接composer update 直接报错?[已解决]
1. 运行环境
macos Monterey 12.3
1). 当前使用的 Laravel 版本?
Laravel 8.5
php artisan –version 命令报错
2). 当前使用的 php/php-fpm 版本?
PHP 版本:
PHP 7.4.28 (cli) (built: Mar 3 2022 06:26:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
with Xdebug v2.9.0, Copyright (c) 2002-2019, by Derick Rethans
php-fpm 版本:
Nginx 29098 0.0 0.0 34122844 852 s000 S+ 4:31PM 0:00.00 grep php-fpm.conf
3). 当前系统
macOS Monterey 12.3
4). 业务环境
使用的 mycms 的系统最新版,不能执行这个命令。作者也不知道原因。
5). 相关软件版本
3.2
2. 问题描述?
以下两个命令均报错
composer update
php artisan –version
错误截图
3. 您期望得到的结果?
解决这个错误,正常运行升级的命令。
4. 您实际得到的结果?
Nginx@MacBook-Pro cms.biorun.com % php artisan --version
Illuminate\Contracts\Container\BindingResolutionException
Target class [CommandMakeCommand] does not exist.
at vendor/laravel/framework/src/Illuminate/Container/Container.php:879
875▕
876▕ try {
877▕ $reflector = new ReflectionClass($concrete);
878▕ } catch (ReflectionException $e) {
➜ 879▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
880▕ }
881▕
882▕ // If the type is not instantiable, the developer is attempting to resolve
883▕ // an abstract type such as an Interface or Abstract Class and there is
+13 vendor frames
14 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
推荐文章: