Kinsta / Trellis / Bedrock / Sage (or custom theme) issue

I’ve successfully setup a Kinsta / Bedrock / Trellis environment that deploys code, but I wanted to build theme assets too. I used the Roots Sage example project, and started using the build-before.yml deploy hook, and it fails with this error:

kinsta_staging | FAILED | rc=2 >>
[Errno 2] No such file or directory

Here is the first task that fails:

- name: Install npm dependencies
  command: yarn install
  delegate_to: localhost
  args:
    chdir: "{{ project_local_path }}"

Here’s the wordpress_sites.yml:

wordpress_sites:
  stg.example.com:
    site_hosts:
      - canonical: staging-xxxxxxxx.kinsta.cloud
    local_path: .. # path targeting local Bedrock site directory (relative to Ansible root)
    repo: git@bitbucket.org:xxxx/xxxxxxxx.git # replace with your Git repo URL
    branch: master
    multisite:
      enabled: false
    ssl:
      enabled: false
      provider: letsencrypt
    cache:
      enabled: false

Instead of having Bedrock inside a site directory, I have it as root of the project, and only have trellis as a sub-directory, and it works great for the deployment. I’m only having problems running yarn install on the root directory, because that’s where I keep my package.json.

Looks like the yarn command was missing, but there wasn’t any output showing that error, even though I was running Ansible with -vvvv.

This topic was automatically closed after 42 days. New replies are no longer allowed.