Error upgrading to 3.3.0-beta6 because of yarn timeout

I get this error:

I, [2024-08-07T11:22:31.056567 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
error Error: https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz: ESOCKETTIMEDOUT

When I follow the link I see this. No idea if that is relevant…


Final error message:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' failed with return #<Process::Status: pid 345 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", "hook"=>"yarn", "cmd"=>["if [ \"$version\" != \"tests-passed\" ]; then\n  rm -rf app/assets/javascripts/node_modules\nfi", "su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'"]}
bootstrap failed with exit code 1

that’s working for me:

wget https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz

btw, do you mean 3.4.0?

1 Like

had a colon at the end :roll_eyes:

dashboard tells me 3.3.0-beta6 is latest…

Just found this topic, will try that:

That’s odd in itself, should look more like:

image

I see that on another instance as well:

3 Likes

aah, thanks, missed that.

Ok, fixed as per Stuck on yarn install, Time out.

For reference, in /var/discourse/templates/web.template.yml I added this block:

  - exec:
      cd: $home
      cmd:
       - su discourse -c 'yarn config set network-timeout 600000 -g'

before this one is called:

  - exec:
      cd: $home
      hook: yarn
      cmd:
        - |-
          if [ "$version" != "tests-passed" ]; then
            rm -rf app/assets/javascripts/node_modules
          fi
        - su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'

But why does it time-out? The solution on the linked topic states that it’s because of the small server specs (Google e2.micro instance, 2 cores, 1 GB RAM). But this is a 4 cores, 6GB VPS.

6 Likes

Thanks for sharing the solution @nolo. This isn’t the first time people have hit this problem, so let’s improve things in the default template:

6 Likes

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