"code" 命名空间中没有定义任何命令
There are no commands defined in the "code" namespace
当我尝试执行 git 提交时,此消息出现在我的控制台中并且不允许我提交。
[2018-09-10 07:39:36] local.ERROR: There are no commands defined in the "code" namespace. {"exception":"[object] (Symfony\Component\Console\Exception\CommandNotFoundException(code: 0): There are no commands defined in the \"code\" namespace. at /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php:564)
[stacktrace]
#0 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(604): Symfony\Component\Console\Application->findNamespace('code')
#1 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(229): Symfony\Component\Console\Application->find('code:lint')
#2 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/MapadoCarro/new-plataform/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 {main}
"}
项目运行正常我就是不能提交。
您是否设置了预提交挂钩来运行 php 单元测试并显示由于错误配置而导致的这些错误?查看 your-project/.git/hooks/
并查看是否存在 pre-commit
文件。
有关 git 挂钩的更多信息,请参阅 official git-hooks docs here。
当我尝试执行 git 提交时,此消息出现在我的控制台中并且不允许我提交。
[2018-09-10 07:39:36] local.ERROR: There are no commands defined in the "code" namespace. {"exception":"[object] (Symfony\Component\Console\Exception\CommandNotFoundException(code: 0): There are no commands defined in the \"code\" namespace. at /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php:564)
[stacktrace]
#0 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(604): Symfony\Component\Console\Application->findNamespace('code')
#1 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(229): Symfony\Component\Console\Application->find('code:lint')
#2 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/MapadoCarro/new-plataform/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 {main}
"}
项目运行正常我就是不能提交。
您是否设置了预提交挂钩来运行 php 单元测试并显示由于错误配置而导致的这些错误?查看 your-project/.git/hooks/
并查看是否存在 pre-commit
文件。
有关 git 挂钩的更多信息,请参阅 official git-hooks docs here。