Rebuild fails (yarn config set network-timeout 600000 -g)

I am running a self-hosted discourse forum at forum.embeetle.com

Web based update failed, so I logged in to the server and tried ./launcher rebuild app. This also failed. The last part of the output is included below.

I tried running git pull before rebuilding, with the same result.

What can I do to debug or fix this?

I, [2025-02-20T16:04:56.812754 #1]  INFO -- : > cd /var/www/discourse && echo hello world
I, [2025-02-20T16:04:56.817855 #1]  INFO -- : hello world

I, [2025-02-20T16:04:56.818026 #1]  INFO -- : > cd /var/www/discourse && yarn config set network-timeout 600000 -g
error This project's package.json defines "packageManager": "yarn@pnpm@9.15.5". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
I, [2025-02-20T16:04:57.341150 #1]  INFO -- : 
I, [2025-02-20T16:04:57.343946 #1]  INFO -- : Terminating async processes
I, [2025-02-20T16:04:57.344898 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main pid: 41
I, [2025-02-20T16:04:57.344966 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 108
2025-02-20 16:04:57.345 UTC [41] LOG:  received fast shutdown request
108:signal-handler (1740067497) Received SIGTERM scheduling shutdown...
2025-02-20 16:04:57.353 UTC [41] LOG:  aborting any active transactions
2025-02-20 16:04:57.365 UTC [41] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
2025-02-20 16:04:57.379 UTC [50] LOG:  shutting down
2025-02-20 16:04:57.389 UTC [50] LOG:  checkpoint starting: shutdown immediate
108:M 20 Feb 2025 16:04:57.389 # User requested shutdown...
108:M 20 Feb 2025 16:04:57.389 * Saving the final RDB snapshot before exiting.
108:M 20 Feb 2025 16:04:57.435 * DB saved on disk
108:M 20 Feb 2025 16:04:57.435 # Redis is now ready to exit, bye bye...
2025-02-20 16:04:57.477 UTC [50] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.053 s, sync=0.022 s, total=0.097 s; sync files=3, longest=0.020 s, average=0.008 s; distance=5 kB, estimate=5 kB
2025-02-20 16:04:57.516 UTC [41] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && yarn config set network-timeout 600000 -g failed with return #<Process::Status: pid 377 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["echo hello world", "yarn config set network-timeout 600000 -g"]}
bootstrap failed with exit code 1
** 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.
91a7a4172196f376fe90922498b34591c341c87dd5e03a03b09102b7432b2e2c
root@foechoer:/srv/embeetle_forum/discourse# 

That looks like something you must’ve added to your app.yml file manually. Deleting that line should get things working again.

(essentially, you need to undo whatever you did here)

4 Likes