Unable to change directory before execution: [Errno 2] No such file or directory: '/srv/www/site.com/releases/20220525144820/web/app/tth

Hello hello
I am quite new to using trellis and sage so maybe I didn’t understand something, but I tried to find an answer to this
I got this error every time I do a trellis deploy production

Unable to change directory before execution: [Errno 2] No such file or
directory: '/srv/www/sitename.com/releases/20220525144820/web/app/themes/sitename'
fatal: [XXX.XX.XX.XX]:

I am on trellis 1.14.0 and using digitalocean
I tried to change the local_path: …/site to local_path: ./site and I got the same error but without the releases/00000number

Unable to change directory before execution: [Errno 2] No such file or
directory: b'./site/web/app/themes/sitename'

it’s weird and I have no clue what I can change or not I tried SSL true false cache true cache false nothing changed I can not pass this error :frowning:

thanks in advance

If it can be helpful to understand
I managed to make a trellis provision prod and dev without any error I have just this error on the deploy which I guess blocking me to get my website on my droplet :frowning:

thank you

Hmm I haven’t seen this issue before

  1. Have you tried visiting the directory on your remote server?

    /srv/www/sitename.com/releases/20220525144820/web/app/themes/sitename

  2. Have you configured build-before.yml to ensure the theme is being built on deploy?

  3. Could you try deploying without the theme to see if the issue lies there, and isn’t something related to permissions maybe?

# Placeholder `deploy_build_before` hook for building theme assets on the
# host machine and then copying the files to the remote server
#
# ⚠️ This example assumes your theme is using Sage 10
# An example for themes built with Sage 8 can be found at: https://git.io/vdgUt
#
# Uncomment the lines below and replace `sage` with your theme folder
#
# ---
 - name: Install npm dependencies
   command: yarn
   delegate_to: localhost
   args:
     chdir: "{{ project_local_path }}/web/app/themes/sitename"

 - name: Install Composer dependencies
   command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts --classmap-authoritative
   args:
     chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/sitename"

 - name: Compile assets for production
   command: yarn build
   delegate_to: localhost
   args:
     chdir: "{{ project_local_path }}/web/app/themes/sitename"

 - name: Copy production assets
   synchronize:
     src: "{{ project_local_path }}/web/app/themes/sitename/public"
     dest: "{{ deploy_helper.new_release_path }}/web/app/themes/sitename"
     group: no
     owner: no
     rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r

it’s my build-before.yml I think it’s correct I change the sage to my sitename

How I can deploy without the theme? I never saw this command :slight_smile: I didn’t even know it was possible :smiley:

on the droplet or even on the vagrant I don’t have any releases/00000 and when I try ./site it’s the good path I think but even there it doesn’t work

I managed to reach this part
/srv/www/sitename.com/releases/20220526160735 of this error
/srv/www/sitename.com/releases/20220526160735/web/app/themes/sitename but after I don’t have web folder on my droplet

I have this


so a bit weird because it seems to be the theme folder itself

how is possible my build-before.yml seems correct at least I did what it’s inside trellis documentation

Where I can find the way to only install WP with my theme? because regardless of if I try to reinstall the droplet with ubuntu 18 or 20lts (on 20lts I got some error) but I manage to provision the production but when I try to deploy I still get this issue

Unable to change directory before execution: [Errno 2] No such file or
directory: '/srv/www/sitename.com/releases/20220527121444/web/app/themes
/sitename_theme'
fatal: [000.000.00.000]: FAILED! => {"changed": false, "cmd": ["composer", "install", "--no-ansi", "--no-dev", "--no-interaction", "--no-progress", "--optimize-autoloader", "--no-scripts", "--classmap-authoritative"], "delta": null, "end": null, "rc": null, "start": null, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

just for info, the errors I got on the ubuntu 20lts is

'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o
"Dpkg::Options::=--force-confold"      install 'build-essential'' failed: E:
Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1827
(apt-get)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is
another process using it?

E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1827
(apt-get)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is
another process using it?
failed: [000.000.00.00] (item=build-essential) => {"ansible_loop_var": "item", "cache_update_time": 1653648393, "cache_updated": false, "changed": false, "item": {"key": "build-essential", "value": "present"}, "rc": 100, "stderr_lines": ["E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1827 (apt-get)", "E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?"], "stdout": "", "stdout_lines": []}

so for this, I go into the droplet and install this built-essential / Ghostscript and a few others do we have maybe another Ubuntu distribution?