yarn 타임아웃으로 인해 3.3.0-beta6로 업그레이드할 때 오류 발생

이러한 오류가 발생합니다:

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

링크를 따라가면 이렇게 보입니다. 이것이 관련이 있는지 모르겠습니다..


최종 오류 메시지:

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

저에게는 이렇게 작동합니다:

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

참고로, 3.4.0을 의미하는 건가요?

마침표 대신 콜론이 있었네요 :roll_eyes:

대시보드에는 3.3.0-beta6이 최신 버전이라고 나와 있습니다..

방금 이 주제를 발견했으니 시도해 볼게요:

그 자체가 좀 이상하네요. 더 다음과 같이 보여야 합니다:

다른 인스턴스에서도 같은 문제가 보입니다:

아, 고마워. 그거 놓쳤었어.

네, Stuck on yarn install, Time out 에 언급된 대로 수정했습니다.

참고로 /var/discourse/templates/web.template.yml 파일에 다음 블록을 추가했습니다:

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

이 블록은 아래 블록이 실행되기 전에 호출됩니다:

  - 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'

그런데 왜 타임아웃이 발생하는 걸까요? 링크된 주제에서 제시된 해결책은 서버 사양이 작기 때문이라고 합니다(Google e2.micro 인스턴스, 2코어, 1GB RAM). 하지만 이 서버는 4코어, 6GB RAM을 가진 VPS입니다.

@nolo 님, 해결책을 공유해 주셔서 감사합니다. 이 문제는 처음 발생하는 것이 아니므로, 기본 템플릿을 개선해 보겠습니다: