Sage 9 Deploy Error

Hey guys,

Opening this new topic here for anyone else having the same issue.

I have for the last couple of days installed, destroyed and provisioned multiple stacks of trellis/bedrock/sage and digital ocean droplets just to make sure I’m following all instructions, but I keep hitting this roadblock in deploying Sage.

On deploy, if I do not run the build-before.yml with trellis deploy everything works fine, however the sage theme does not compile and when trying to activate the theme I end up with this message, which is as expected:

Sage › Error
Autoloader not found.
You must run composer install from the Sage directory.

Sage Docs | Sage Docs | Roots

If I do include the build-before.yml, on deploy on the DO droplet, it always fails at the same point - trying to execute on the tasks within the build-before.yml file:

TASK [deploy : include_tasks]


included: /Users/debe/Sites/test/trellis/deploy-hooks/build-before.yml for 139.59.182.223

TASK [deploy : Clone project files] > ************************************************************************************************
changed: [139.59.182.223]

TASK [deploy : Install npm dependencies] *******************************************************************************************
System info:
Ansible 2.5.4; Darwin
Trellis version (per changelog): “build-before: Checkout project source code to local temporary directory”

MODULE FAILURE
Traceback (most recent call last):
File “/var/folders/b3/qnqp7j4n331gy1gt089nbw6jcfypyr/T/ansible_fx8KGO/ansib
le_module_command.py”, line 248, in
main()
File “/var/folders/b3/qnqp7j4n331gy1gt089nbw6jcfypyr/T/ansible_fx8KGO/ansib
le_module_command.py”, line 192, in main
os.chdir(chdir)
OSError: [Errno 2] No such file or directory: ‘/var/folders/b3/qnqp7j4n331gy1
gt089nbw6jcfypyr/T/trellis/muchness.co/production/web/app/themes/sage’

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 2] No such file or directory: ‘/var/folders/b3/qnqp7j4n331gy1gt089nbw6jcfypyr/T/trellis/muchness.co/production/web/app/themes/sage’
fatal: [139.59.182.223]: FAILED! => {“changed”: false, “module_stdout”: “”, “rc”: 1}
to retry, use: --limit @/Users/debe/Sites/test/trellis/deploy.retry

PLAY RECAP *************************************************************************************************************************
139.59.182.223 : ok=13 changed=5 unreachable=0 failed=1
localhost : ok=0 changed=0 unreachable=0 failed=0

I saw after much googling there was a pull request to this file, and something has changed within the last 2 weeks.
https://github.com/roots/trellis/pull/997

I hope someone can help with this. Thanks :slight_smile:
Dave

Edit Tried to format the text a bit for better readability

That PR was reverted temporarily until we can figure the issue out. If you apply that revert it should fix the problem.