Trying to deploy a Shopify webapp using Heroku (following Shopify documentation) I am pushing from a branch (to test before merging into master) running git push heroku <branch name>:refs/head/main
. This fails on step 10 of 15:
remote: Step 10/15 : RUN composer install
remote: ---> Running in 6591d6b4b644
remote: Installing dependencies from lock file (including require-dev)
remote: Verifying lock file contents can be installed on current platform.
remote: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
remote: Your lock file does not contain a compatible set of packages. Please run composer update.
remote:
remote: Problem 1
remote: - Root composer.json requires PHP extension ext-sqlite3 * but it is missing from your system. Install or enable PHP's sqlite3 extension.
remote:
remote: To enable extensions, verify that they are enabled in your .ini files:
In PHP.ini I changed the extension directory to its location on my machine. I uncommented the line ";sqlite3" which caused issues, so I reverted this change.
Composer update responds with:
Nothing to modify in lock file
and:
Nothing to install, update, or remove
I tried brew reinstall sqlite
and have the most up-to-date version.
My application uses MySQL (not SQLite), so I removed the SQLite requirement from composer.json. The app works on local hosting (Shopify), but I encounter the same error when I push the changes.
Is this related to Heroku, Docker containers, my code, or something else? My post in Shopify community and Heroku ticket haven't received answers.
Manually remove the ext-sqlite3
dependency from your composer.json
with a text editor
Update your composer.lock
lock-file with command composer update --lock
Commit both file changes to your local git repository
git add composer.json composer.lock
git commit -m 'Remove SQLite3 PHP extension'
Push your changes to the Heroku git remote
git push heroku <branch name>