Laravel流浪错误

时间:2016-03-29 08:54:10

标签: laravel vagrant composer-php

我克隆了一个git存储库并执行了composer installvagrant up。当我在浏览器中运行应用程序时,我收到此错误:

enter image description here

当我在流程结束时使用vagrant up命令时,它给了我:

enter image description here

当我的伴侣完成与我所做的完全相同的事情时,该应用程序可以正常运行。你能帮助我吗?

3 个答案:

答案 0 :(得分:1)

这可能是由于最近Composer的变化。

您可能需要查看enter link description here

解决此问题的最简单方法是将上述提取请求的更改应用于composer.json文件:

替换:

"pre-update-cmd": [
    "php artisan clear-compiled"
],
"post-update-cmd": [
    "php artisan optimize"
]

使用:

"post-update-cmd": [
    "php artisan clear-compiled",
    "php artisan optimize"
]


Laravel 5.2.25(2016-03-24)引入了更多孤立的脚本,您可以这样使用:

"post-install-cmd": [
    "Illuminate\\Foundation\\ComposerScripts::postInstall",
    "php artisan optimize"
],
"post-update-cmd": [
    "Illuminate\\Foundation\\ComposerScripts::postUpdate",
    "php artisan optimize"
]

参考:https://github.com/laravel/laravel/pull/3687 - laravel/framework#12827

答案 1 :(得分:0)

我自己解决了这个问题,在这个特殊情况下我不得不重新安装我的虚拟机,因为它已经过时了

答案 2 :(得分:-1)

它可能与它没有任何关联,但是我多次将我的作曲家安装到名为“Code”的父目录,而不是在实际的项目目录中,而不是我会得到这样的错误。< / p>

相关问题