###【前提・実現したいこと】
[heroku]PHP(Laravel)でgit push heroku masterした際にエラーが出たため、エラーを解消したい。
###【概要】
PHP(Laravel)で作成したToDoアプリをgit push heroku masterした際に
以下のエラーメッセージが発生しました。
###【エラーメッセージについて】
XXnoMacBook-Pro:todo XX$ git push heroku master Enumerating objects: 206, done. Counting objects: 100% (206/206), done. Delta compression using up to 16 threads Compressing objects: 100% (183/183), done. Writing objects: 100% (206/206), 541.04 KiB | 5.10 MiB/s, done. Total 206 (delta 32), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> PHP app detected remote: -----> Bootstrapping... remote: -----> Installing platform packages... remote: - php (7.4.8) remote: - ext-mbstring (bundled with php) remote: - apache (2.4.43) remote: - nginx (1.18.0) remote: -----> Installing dependencies... remote: Composer version 1.10.7 2020-06-03 10:03:56 remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Package operations: 59 installs, 0 updates, 0 removals remote: - Installing doctrine/inflector (1.3.1): Downloading (100%) remote: - Installing doctrine/lexer (1.2.0): Downloading (100%) remote: - Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%) remote: - Installing voku/portable-ascii (1.4.10): Downloading (100%) remote: - Installing symfony/polyfill-ctype (v1.15.0): Downloading (100%) remote: - Installing phpoption/phpoption (1.7.3): Downloading (100%) remote: - Installing vlucas/phpdotenv (v4.1.3): Downloading (100%) remote: - Installing symfony/css-selector (v5.0.7): Downloading (100%) remote: - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Downloading (100%) remote: - Installing symfony/polyfill-mbstring (v1.15.0): Downloading (100%) remote: - Installing symfony/var-dumper (v5.0.7): Downloading (100%) remote: - Installing symfony/routing (v5.0.7): Downloading (100%) remote: - Installing symfony/process (v5.0.7): Downloading (100%) remote: - Installing symfony/polyfill-php72 (v1.15.0): Downloading (100%) remote: - Installing symfony/polyfill-intl-idn (v1.15.0): Downloading (100%) remote: - Installing symfony/mime (v5.0.7): Downloading (100%) remote: - Installing symfony/polyfill-php73 (v1.15.0): Downloading (100%) remote: - Installing symfony/http-foundation (v5.0.7): Downloading (100%) remote: - Installing psr/event-dispatcher (1.0.0): Downloading (100%) remote: - Installing symfony/event-dispatcher-contracts (v2.0.1): Downloading (100%) remote: - Installing symfony/event-dispatcher (v5.0.7): Downloading (100%) remote: - Installing psr/log (1.1.3): Downloading (100%) remote: - Installing symfony/error-handler (v5.0.7): Downloading (100%) remote: - Installing symfony/http-kernel (v5.0.7): Downloading (100%) remote: - Installing symfony/finder (v5.0.7): Downloading (100%) remote: - Installing psr/container (1.0.0): Downloading (100%) remote: - Installing symfony/service-contracts (v2.0.1): Downloading (100%) remote: - Installing symfony/console (v5.0.7): Downloading (100%) remote: - Installing symfony/polyfill-iconv (v1.15.0): Downloading (100%) remote: - Installing egulias/email-validator (2.1.17): Downloading (100%) remote: - Installing swiftmailer/swiftmailer (v6.2.3): Downloading (100%) remote: - Installing ramsey/collection (1.0.1): Downloading (100%) remote: - Installing brick/math (0.8.14): Downloading (100%) remote: - Installing ramsey/uuid (4.0.1): Downloading (100%) remote: - Installing psr/simple-cache (1.0.1): Downloading (100%) remote: - Installing opis/closure (3.5.1): Downloading (100%) remote: - Installing symfony/translation-contracts (v2.0.1): Downloading (100%) remote: - Installing symfony/translation (v5.0.7): Downloading (100%) remote: - Installing nesbot/carbon (2.32.2): Downloading (100%) remote: - Installing monolog/monolog (2.0.2): Downloading (100%) remote: - Installing league/flysystem (1.0.66): Downloading (100%) remote: - Installing league/commonmark (1.3.2): Downloading (100%) remote: - Installing laravel/framework (v7.4.0): Downloading (100%) remote: - Installing fideloper/proxy (4.3.0): Downloading (100%) remote: - Installing asm89/stack-cors (1.3.0): Downloading (100%) remote: - Installing fruitcake/laravel-cors (v1.0.5): Downloading (100%) remote: - Installing ralouphie/getallheaders (3.0.3): Downloading (100%) remote: - Installing psr/http-message (1.0.1): Downloading (100%) remote: - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%) remote: - Installing guzzlehttp/promises (v1.3.1): Downloading (100%) remote: - Installing guzzlehttp/guzzle (6.5.2): Downloading (100%) remote: - Installing jakub-onderka/php-console-color (v0.2): Downloading (100%) remote: - Installing nikic/php-parser (v4.3.0): Downloading (100%) remote: - Installing jakub-onderka/php-console-highlighter (v0.4): Downloading (100%) remote: - Installing dnoegel/php-xdg-base-dir (v0.1.1): Downloading (100%) remote: - Installing psy/psysh (v0.10.2): Downloading (100%) remote: - Installing laravel/tinker (v2.3.0): Downloading (100%) remote: - Installing laravel/ui (v2.0.3): Downloading (100%) remote: - Installing predis/predis (v1.1.1): Downloading (100%) remote: Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead. remote: Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead. remote: Generating optimized autoload files remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump remote: > @php artisan package:discover --ansi remote: remote: In Connection.php line 670: remote: remote: Database (/tmp/build_edc01494/database/database.sqlite) does not exist. (SQ remote: L: PRAGMA foreign_keys = ON;) remote: remote: remote: In SQLiteConnector.php line 34: remote: remote: Database (/tmp/build_edc01494/database/database.sqlite) does not exist. remote: remote: remote: Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 remote: ! WARNING: A post-autoload-dump script terminated with an error remote: remote: ! ERROR: Dependency installation failed! remote: ! remote: ! The 'composer install' process failed with an error. The cause remote: ! may be the download or installation of packages, or a pre- or remote: ! post-install hook (e.g. a 'post-install-cmd' item in 'scripts') remote: ! in your 'composer.json'. remote: ! remote: ! Typical error cases are out-of-date or missing parts of code, remote: ! timeouts when making external connections, or memory limits. remote: ! remote: ! Check the above error output closely to determine the cause of remote: ! the problem, ensure the code you're pushing is functioning remote: ! properly, and that all local changes are committed correctly. remote: ! remote: ! For more information on builds for PHP on Heroku, refer to remote: ! https://devcenter.heroku.com/articles/php-support remote: ! remote: ! REMINDER: the following warnings were emitted during the build; remote: ! check the details above, as they may be related to this error: remote: ! - A post-autoload-dump script terminated with an error remote: remote: ! Push rejected, failed to compile PHP app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to tskmgmt-tool. remote: To https://git.heroku.com/tskmgmt-tool.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/tskmgmt-tool.git'
【確認したこと】
In Connection.php line 670: Database (/tmp/build_edc01494/database/database.sqlite) does not exist. (SQL: PRAGMA foreign_keys = ON;) In SQLiteConnector.php line 34: Database (/tmp/build_edc01494/database/database.sqlite) does not exist.
上記に関してエラーが出ているのですが、ToDoアプリ開発に際してはMySQLを使用しています。
※ただ、当アプリを開発する初期に、sqliteを使用するつもりでdatabase配下にdatabase.sqlite及びdummy_database.sqlite(誤作成と思われる)というファイルを作成しており、そのDBファイルが未だ存在している事がエラーの原因なのかと推測しております。
###【質問】
①database.sqlite及びdummy_database.sqliteの2ファイルは削除することでエラーが解決するかどうか
②それともそれ以外に問題点があるのか
尚、Connection.php line 670及びSQLiteConnector.php line 34に関しては、ファイルを見つける事ができなかった為、自身のファイル構造に対する知識理解が足りていない状況です。
知識が欠落している中での質問となってしまい、大変恐縮ですが、自作アプリの公開というビッグイベントを無事遂行すべく、お力添えいただけますと幸いです。
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/23 03:34