命令“清除编译”未定义。 Laravel 5.2 [英] Command "clear-compiled" is not defined. Laravel 5.2

查看:1316
本文介绍了命令“清除编译”未定义。 Laravel 5.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Composer下载Laravel HTML依赖项。

I am trying to download Laravel HTML dependencies with Composer.

composer.json p>

composer.json is here:

"name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "illuminate/html": "5.2"
    },

当我运行 composer update code> php composer update ,终端日志为:

And when I run composer update or php composer update, the terminal log is:

E:\xampp\htdocs\lara-test>composer update
> php artisan clear-compiled

  [InvalidArgumentException]
  Command "clear-compiled" is not defined.

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error

  [RuntimeException]
  Error Output:

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
 [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-
progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
 [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--pre
fer-lowest] [-i|--interactive] [--] [<packages>]...

缺少什么?
请帮助。

What is missing? Please help.

推荐答案

您可以使用 composer update --no-scripts 它运行来自composer的update命令,而不执行 composer.json 文件中定义的脚本。

You can get around this by using composer update --no-scripts which runs the update command from composer without the executing the scripts defined in the composer.json file.

作为运行 composer update 的一部分,执行运行 php artisan清除编译的脚本 - 有效地更新工作正常,只是没有编译的文件被清除。

As part of running composer update a script is executed which runs php artisan clear-compiled - effectively the update works as normal, just without compiled files being cleared.

在其他工作有几个博客文章: http://jianjye.com/fix-command-clear-compiled-not-defined-error-upgrading-laravel-5-2 / https://github.com/laravel/framework/issues/9678 记录的问题

There's a couple of blog posts on other work arounds: http://jianjye.com/fix-command-clear-compiled-not-defined-error-upgrading-laravel-5-2/ and an issue logged https://github.com/laravel/framework/issues/9678

这篇关于命令“清除编译”未定义。 Laravel 5.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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