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

<s
リンクをたどると、これが見えます。関連があるかどうかはわかりません。


最終的なエラーメッセージ:

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 のことですか?

「いいね!」 1

最後にコロンがありました::roll_eyes:

ダッシュボードは、最新バージョンが 3.3.0-beta6 だと教えてくれます。

このトピックを見つけました。これを試してみます。

それ自体が奇妙ですね。もっとこうなるはずです。

それも別のインスタンスで確認しました。

「いいね!」 3

ああ、ありがとう、それを見逃していました。

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 &amp;&amp; yarn cache clean'

しかし、なぜタイムアウトするのでしょうか? リンク先のトピックの解決策では、サーバーのスペックが低い(Google e2.micro インスタンス、2 コア、1 GB RAM)ためだと述べられています。しかし、これは 4 コア、6 GB の VPS です。

「いいね!」 6

解決策を共有していただきありがとうございます、@nolo。この問題が発生したのは初めてではありませんので、デフォルトのテンプレートを改善しましょう。

「いいね!」 6

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