Rebuild fails because still on `master` branch. Fix with `git checkout main`

I guess this missing yarn is the issue? I don’t what what could be causing it or anything else that might be an explanation…

discourse-checklist is already at latest compatible version
discourse-spoiler-alert is already at latest compatible version
discourse-affiliate is already at latest compatible version

I, [2022-02-15T18:02:48.675851 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
I, [2022-02-15T18:02:55.018972 #1]  INFO -- : 
I, [2022-02-15T18:02:55.019167 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
sh: 1: yarn: not found
I, [2022-02-15T18:03:00.609631 #1]  INFO -- : Checking 'Easy Footer (TH)' for 'default'... up to date
Checking 'discourse-user-field-prompt' for 'default'... up to date
Checking 'Rotate Global Banner(JP)' for 'default'... 



FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 5437 exit 127>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
d6ac4e7c27174dd04269576be15628207fe7d8d19f99c6ea524836f8ee43b895
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Our base image ships with yarn for a while. What is the base image version you are running?

1 Like

I thought I was going crazy.

The issue was that this host was still on master; git checkout main has solved the problem.

I guess I should be doing a git checkout main on all hosts two-container hosts where the procedure is to bootstrap/destroy/start rather than rebuild in case they’re old enough to need it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.