Runtime.js Failed to open stream

Today I brought in an old project I haven’t touched on in a year or so and getting it setup on my local env with a newer Macbook M2 chip.

I updated Trellis and was able to get my local server running on the site. I was able to connect to staging and production env and using the sync script, pull my data down to my local.

Everything on my local is up and running fine.

I was able to reprovision the staging server with zero errors and then deploy with zero errors.

When attempting to to access the project on staging or /wp-admin, I am blocked by this error.

I am unable to find any relevant information to get around this.

Can anyone provide any guidance? thanks.

`

file_get_contents(/srv/www/myproject.build/releases/20240212223632/web/app/themes/crm/public/runtime.8306ad.js): Failed to open stream: No such file or directory`

Hi,
When you deploy your site, you must have a build_before playbook in Trellis, right? Can you show us the contents of that file?

Hi @MWDelaney

I haven’t attempted to tackle this issue since I first posted fyi, but yes, here is my contents of that file:

# 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/crm"
#
- 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/crm"
#
- name: Compile assets for production
  command: yarn build
  delegate_to: localhost
  args:
    chdir: "{{ project_local_path }}/web/app/themes/crm"
#
- name: Copy production assets
  synchronize:
    src: "{{ project_local_path }}/web/app/themes/crm/public"
    dest: "{{ deploy_helper.new_release_path }}/web/app/themes/crm"
    group: no
    owner: no
    rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r

Thanks. This looks like it’s compiling on your local machine, so I would check your local versions of Node and Composer.

Thanks. I won’t be able to get back to that this week but maybe next week. I will check those out and post what I discover here.

I just had the same issue. Seems to be working when i started using node 20.12.2 as i was just using 20.0.0!