Hello! Long time listener, first time caller.
We’ve been scratching our head about this error: When deploying our Trellis+Bedrock+Sage project to a Digital Ocean droplet, we’ve started getting this error (It had been deploying successfully previously):
TASK [deploy : Check for composer.json in project root or project_subtree_path]
ok: [xxx.xxx.xxx.xxx]
TASK [deploy : Fail if composer.json not found] ********************************
skipping: [xxx.xxx.xxx.xxx]
TASK [deploy : Install Composer dependencies] **********************************
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"changed": true, "cmd": ["composer", "install", "--no-ansi", "--no-dev", "--no-interaction", "--no-progress", "--optimize-autoloader", "--no-scripts"], "delta": "0:00:12.444034", "end": "2016-02-24 06:18:25.320677", "failed": true, "rc": 1, "start": "2016-02-24 06:18:12.876643", "stderr": "Loading composer repositories with package information
Installing dependencies from lock file
- Installing johnpbloch/wordpress (4.4.2)
Downloading
Failed to download johnpbloch/wordpress from dist: Could not decompress the archive, enable the PHP zip extension.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
Now trying to download from source
- Installing johnpbloch/wordpress (4.4.2)
Cloning fe9320de0793602084c600e22c0c5e0bb601a264
- Installing wpackagist-plugin/better-wp-security (5.3.0)
Downloading
Failed to download wpackagist-plugin/better-wp-security from dist: Could not decompress the archive, enable the PHP zip extension.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
Now trying to download from source
- Installing wpackagist-plugin/better-wp-security (5.3.0)
Checking out tags/5.3.0
[RuntimeException]
Package could not be downloaded,
sh: 1: svn: not found
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...", "stdout": "", "stdout_lines": [], "warnings": []}
This happens when any plugin from the wp-packagist repository is in composer.json, and doesn’t happen locally. If we remove wp-packagist items from composer.json, the deploy is successful.
And our wordpress_sites.yml config is below for reference. (Same error happens with or without hooks committed in the staging or production branches of the repo)
# # Documentation: https://roots.io/trellis/docs/remote-server-setup/
project_pre_build_commands_local:
- path: "{{ project.local_path }}/web/app/themes/gptheme"
cmd: npm install
- path: "{{ project.local_path }}/web/app/themes/gptheme"
cmd: bower install
- path: "{{ project.local_path }}/web/app/themes/gptheme"
cmd: gulp --production
project_local_files:
- name: compiled theme assets
src: "{{ project.local_path }}/web/app/themes/gptheme/dist"
dest: web/app/themes/gptheme
wordpress_sites:
example.com:
site_hosts:
- xxx.xxx.xxx.xxx
local_path: '../site' # path targeting local Bedrock site directory (relative to Ansible root)
repo: git@bitbucket.org:nickxd/example.git
branch: staging
repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo (above) if it is not the root (like the roots-example-project structure)
multisite:
enabled: false
subdomains: false
ssl:
enabled: false
cache:
enabled: false
duration: 30s
env:
disable_wp_cron: true
wp_home: http://xxx.xxx.xxx.xxx
wp_siteurl: http://xxx.xxx.xxx.xxx/wp
wp_env: staging
db_name: example_staging
db_user:example_staging_dbuser
# Define the following variables in group_vars/staging/vault.yml
# db_password:
# auth_key:
# secure_auth_key:
# logged_in_key:
# nonce_key:
# auth_salt:
# secure_auth_salt:
# logged_in_salt:
# nonce_salt: