简体   繁体   English

关于Laravel项目的Ran Composer更新,我在 <body> 标签

[英]Ran Composer Update on Laravel project, I have garbled text inside beginning of <body> tag

I'm working on a Laravel 5.2 project and needed to ran "composer update" to install and update some dependencies. 我正在研究Laravel 5.2项目,需要运行“ composer update”来安装和更新一些依赖项。 It seemed to run fine, but at the very end the CLI output: 看起来运行良好,但最后是CLI输出:

> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Bu1Scompapplg1Scomp+?appmoDDdutcӪ.'
                                   @? @ @ @
                                           E?DSDB ` @ @ @Generating optimized class loader

Now when I load any page (locally using MAMP), the body tag begins with a similar piece of garbled text to the above. 现在,当我加载任何页面(在本地使用MAMP)时,body标签都以与上面类似的乱码开头。 If I remove my highest level layout completely, it's literally the only visible thing rendered on the page. 如果我完全删除最高级别的布局,则它实际上是页面上唯一可见的东西。

<body>
    Bud1�1Scompapplg1Scomp+�appmoDDdutcӪ.' @� @� @� @E�DSDB `� @� @� 
</body>

I can see it on any page loaded and as far as a search goes, it doesn't appear to be in any of the views. 我可以在加载的任何页面上看到它,就搜索而言,它似乎没有出现在任何视图中。 I've tried a search of the whole project for small pieces of the string but it returns nothing. 我尝试在整个项目中搜索一小串字符串,但没有任何结果。 Any idea where this might be being generated and why? 任何想法可能在哪里产生的,为什么? Thanks in advance. 提前致谢。

Update: it actually seems to be to do with running any artisan commands as it's the first thing output by the command. 更新:实际上似乎与运行任何artisan命令有关,因为这是该命令输出的第一件事。 If I run just php artisan then it's the first thing output before it shows all the possible commands. 如果我只运行php artisan那么它是显示所有可能命令之前的第一件事。

My Solution: was unable to find the root cause so I simply reverted the project to its previous state and manually installed the packages I needed. 我的解决方案:无法找到根本原因,所以我只是将项目还原到了以前的状态,然后手动安装了所需的软件包。

Try grep -R compapp . 尝试grep -R compapp . It should show corrupted file, then you can pin version of broken package in your composer.json. 它应该显示损坏的文件,然后您可以在composer.json中固定损坏的软件包的版本。 It's hard to say something more certain without seeing your composer.json. 如果不查看composer.json,很难说出更多确定的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM