前提・実現したいこと
GitLabとHeroku を連携させて、GitLab上のマスターブランチをデプロイしたい(初デプロイ)
発生している問題
下記画像内の「Deploy Branch」を押下すると記載したようなエラーメッセージが表示されます
エラーメッセージ
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. Detected buildpacks: PHP,Node.js See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order -----> PHP app detected -----> Bootstrapping... -----> Installing platform packages... - php (7.4.13) - ext-mbstring (bundled with php) - composer (2.0.8) - apache (2.4.46) - nginx (1.18.0) -----> Installing dependencies... Composer version 2.0.8 2020-12-03 17:20:38 Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Package operations: 47 installs, 0 updates, 0 removals - Downloading doctrine/inflector (v1.3.0) - Downloading doctrine/lexer (1.1.0) - Downloading dragonmantank/cron-expression (v2.3.0) - Downloading erusev/parsedown (1.7.3) - Downloading symfony/polyfill-ctype (v1.12.0) - Downloading phpoption/phpoption (1.5.0) - Downloading vlucas/phpdotenv (v3.6.0) - Downloading symfony/css-selector (v4.3.5) - Downloading tijsverkoyen/css-to-inline-styles (2.2.2) - Downloading symfony/polyfill-php72 (v1.12.0) - Downloading symfony/polyfill-mbstring (v1.12.0) - Downloading symfony/var-dumper (v4.3.5) - Downloading symfony/routing (v4.3.5) - Downloading symfony/process (v4.3.5) - Downloading symfony/polyfill-php73 (v1.12.0) - Downloading symfony/polyfill-intl-idn (v1.12.0) - Downloading symfony/mime (v4.3.5) - Downloading symfony/http-foundation (v4.3.5) - Downloading symfony/event-dispatcher-contracts (v1.1.7) - Downloading symfony/event-dispatcher (v4.3.5) - Downloading psr/log (1.1.1) - Downloading symfony/debug (v4.3.5) - Downloading symfony/http-kernel (v4.3.5) - Downloading symfony/finder (v4.3.5) - Downloading psr/container (1.0.0) - Downloading symfony/service-contracts (v1.1.7) - Downloading symfony/console (v4.3.5) - Downloading symfony/polyfill-iconv (v1.12.0) - Downloading egulias/email-validator (2.1.11) - Downloading swiftmailer/swiftmailer (v6.2.1) - Downloading paragonie/random_compat (v9.99.99) - Downloading ramsey/uuid (3.8.0) - Downloading psr/simple-cache (1.0.1) - Downloading opis/closure (3.4.1) - Downloading symfony/translation-contracts (v1.1.7) - Downloading symfony/translation (v4.3.5) - Downloading nesbot/carbon (2.25.3) - Downloading monolog/monolog (2.0.0) - Downloading league/flysystem (1.0.57) - Downloading laravel/framework (v6.4.0) - Downloading fideloper/proxy (4.2.1) - Downloading jakub-onderka/php-console-color (v0.2) - Downloading nikic/php-parser (v4.2.4) - Downloading jakub-onderka/php-console-highlighter (v0.4) - Downloading dnoegel/php-xdg-base-dir (0.1) - Downloading psy/psysh (v0.9.9) - Downloading laravel/tinker (v1.0.10) - Installing doctrine/inflector (v1.3.0): Extracting archive - Installing doctrine/lexer (1.1.0): Extracting archive - Installing dragonmantank/cron-expression (v2.3.0): Extracting archive - Installing erusev/parsedown (1.7.3): Extracting archive - Installing symfony/polyfill-ctype (v1.12.0): Extracting archive - Installing phpoption/phpoption (1.5.0): Extracting archive - Installing vlucas/phpdotenv (v3.6.0): Extracting archive - Installing symfony/css-selector (v4.3.5): Extracting archive - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Extracting archive - Installing symfony/polyfill-php72 (v1.12.0): Extracting archive - Installing symfony/polyfill-mbstring (v1.12.0): Extracting archive - Installing symfony/var-dumper (v4.3.5): Extracting archive - Installing symfony/routing (v4.3.5): Extracting archive - Installing symfony/process (v4.3.5): Extracting archive - Installing symfony/polyfill-php73 (v1.12.0): Extracting archive - Installing symfony/polyfill-intl-idn (v1.12.0): Extracting archive - Installing symfony/mime (v4.3.5): Extracting archive - Installing symfony/http-foundation (v4.3.5): Extracting archive - Installing symfony/event-dispatcher-contracts (v1.1.7): Extracting archive - Installing symfony/event-dispatcher (v4.3.5): Extracting archive - Installing psr/log (1.1.1): Extracting archive - Installing symfony/debug (v4.3.5): Extracting archive - Installing symfony/http-kernel (v4.3.5): Extracting archive - Installing symfony/finder (v4.3.5): Extracting archive - Installing psr/container (1.0.0): Extracting archive - Installing symfony/service-contracts (v1.1.7): Extracting archive - Installing symfony/console (v4.3.5): Extracting archive - Installing symfony/polyfill-iconv (v1.12.0): Extracting archive - Installing egulias/email-validator (2.1.11): Extracting archive - Installing swiftmailer/swiftmailer (v6.2.1): Extracting archive - Installing paragonie/random_compat (v9.99.99): Extracting archive - Installing ramsey/uuid (3.8.0): Extracting archive - Installing psr/simple-cache (1.0.1): Extracting archive - Installing opis/closure (3.4.1): Extracting archive - Installing symfony/translation-contracts (v1.1.7): Extracting archive - Installing symfony/translation (v4.3.5): Extracting archive - Installing nesbot/carbon (2.25.3): Extracting archive - Installing monolog/monolog (2.0.0): Extracting archive - Installing league/flysystem (1.0.57): Extracting archive - Installing laravel/framework (v6.4.0): Extracting archive - Installing fideloper/proxy (4.2.1): Extracting archive - Installing jakub-onderka/php-console-color (v0.2): Extracting archive - Installing nikic/php-parser (v4.2.4): Extracting archive - Installing jakub-onderka/php-console-highlighter (v0.4): Extracting archive - Installing dnoegel/php-xdg-base-dir (0.1): Extracting archive - Installing psy/psysh (v0.9.9): Extracting archive - Installing laravel/tinker (v1.0.10): Extracting archive Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi In PackageManifest.php line 122: Undefined index: name Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 ! WARNING: A post-autoload-dump script terminated with an error ! ERROR: Dependency installation failed! ! ! The 'composer install' process failed with an error. The cause ! may be the download or installation of packages, or a pre- or ! post-install hook (e.g. a 'post-install-cmd' item in 'scripts') ! in your 'composer.json'. ! ! Typical error cases are out-of-date or missing parts of code, ! timeouts when making external connections, or memory limits. ! ! Check the above error output closely to determine the cause of ! the problem, ensure the code you're pushing is functioning ! properly, and that all local changes are committed correctly. ! ! For more information on builds for PHP on Heroku, refer to ! https://devcenter.heroku.com/articles/php-support ! ! REMINDER: the following warnings were emitted during the build; ! check the details above, as they may be related to this error: ! - A post-autoload-dump script terminated with an error ! Push rejected, failed to compile PHP app. ! Push failed
試したこと
調べてみると、Composer本体のバージョンが2系だとデプロイに影響が出る可能性があるとのことだったので、以下2つを試してみたが、エラーの内容は解消されませんでした。
・Laravelのバージョンを6.x→7.xにアップグレード
・Composer本体のバージョンを1系に固定化する(composer self-update --1)
設定や、バージョンの問題なのでしょうか。
何か解決方法にお心当たりのある方は、コメントいただけると幸いです。
補足情報(FW/ツールのバージョンなど)
PHP 7.3.9
Composer 1.10.19
Laravel Framework 7.30.1
heroku/7.47.6 win32-x64 node-v12.16.2