1

我用这个简短的 shell 脚本(要点链接)创建了一个全新的 Laravel 5 项目,并在 Fortrabbit 上创建了一个应用程序来部署它。当我将所有内容检查到 git 并将其推送时,我收到以下错误:

Deployment file:
  not found

Pre-script:
  not found
  0ms

Composer:
  - - -
  Loading composer repositories with package information
  Installing dependencies (including require-dev) from lock file
  Nothing to install or update
  Generating optimized autoload files
  > Illuminate\Foundation\ComposerScripts::postInstall
  > php artisan optimize



    [ErrorException]         
    Undefined index: driver  



  Script php artisan optimize handling the post-install-cmd event returned with error code 1

  - - -


A B O R T E D

  !! Failure in build execution: Failure in composer execution

我的 composer.json 是 Laravel 安装的默认值:

"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},

是什么导致了这个错误,我该如何解决?谢谢

4

0 回答 0