خطأ أثناء التحديث إلى 3.3.0-beta6 بسبب مهلة yarn

أواجه هذا الخطأ:

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
عندما أتبع الرابط أرى هذا. لا أعرف ما إذا كان ذلك ذا صلة..


</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 instance، نواتان، 1 جيجابايت ذاكرة وصول عشوائي). ولكن هذا خادم افتراضي خاص بـ 4 نوى و 6 جيجابايت.

6 إعجابات

شكراً لمشاركة الحل @nolo. هذه ليست المرة الأولى التي يواجه فيها الأشخاص هذه المشكلة، لذا دعنا نحسّن الأمور في القالب الافتراضي:

6 إعجابات

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