엔진 "yarn"이 이 모듈과 호환되지 않습니다. 예상 버전: "please-use-pnpm". 실제 버전: "1.22.19"

업데이트가 사용 가능하다는 알림을 받은 후, 평소처럼 웹 인터페이스에 접속하여 업데이트 버튼을 눌렀습니다.

전형적인 discourse 스타일대로, 설치 환경이 스스로 파괴되어 다시 이미지를 빌드해서 실행하는 것이 불가능한 상태입니다.

저는 데이터 이미지와 웹 이미지를 분리하여 모두 docker를 통해 실행하고 있습니다.

평소 이 문제를 해결하던 수동 재빌드 스크립트는 다음과 같습니다:

./launcher bootstrap discourse-web && ./launcher destroy discourse-web && ./launcher start discourse-web

이 명령을 실행하면 다음과 같은 오류가 발생합니다:

I, [2025-02-05T01:12:54.160568 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2025-02-05T01:12:55.503875 #1]  INFO -- : Successfully installed bundler-2.5.18
1 gem installed

I, [2025-02-05T01:12:55.503987 #1]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2025-02-05T01:12:56.681293 #1]  INFO -- : 
I, [2025-02-05T01:12:56.681583 #1]  INFO -- : > cd /var/www/discourse && if [ "beta" != "tests-passed" ]; then
  rm -rf app/assets/javascripts/node_modules
fi
I, [2025-02-05T01:12:56.685171 #1]  INFO -- : 
I, [2025-02-05T01:12:56.685238 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
error discourse@: The engine "yarn" is incompatible with this module. Expected version "please-use-pnpm". Got "1.22.19"
warning discourse@: The engine "pnpm" appears to be invalid.
error Found incompatible module.
I, [2025-02-05T01:12:57.086009 #1]  INFO -- : yarn install v1.22.19
info No lockfile found.
[1/5] Validating package.json...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.



FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' failed with return #<Process::Status: pid 202 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.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
** 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.
d480e23784a1dd765d52d483ee94174d7d5cfad5ba8ccec61e76a48ac8ddf32a

이 오류에 대한 매칭되는 정보를 찾지 못하고 있으며, discourse-base 이미지를 초기화하거나 pull하는 것조차 아무런 차이를 만들지 않습니다 - 모든 것이 여기서 죽습니다.

다시 시스템을 정상적으로 실행 상태로 돌릴 수 있는 방법이 있을까요?

기록으로 남기기 위해 말씀드리면, discourse/base:2.0.20250129-0720 업데이트가 이 문제를 해결한 것으로 보입니다.

안녕하세요 @CRCinAU. 저는 discourse를 비교적 최근에 시작했습니다. 변경 사항을 업데이트해야 하는 곳이 어디인지 좀 더 자세히 알려주실 수 있을까요?

감사합니다.

/var/discourse에 있는 discourse_docker의 최신 복사본을 가져오고 있는지 확인해야 합니다. 표준 설치에서 사용되는 ./launcher rebuild 명령은 이를 자동으로 처리합니다. 하지만 사용자 정의 스크립트를 사용 중인 경우, 직접 수행해야 합니다.

동일한 오류를 확인하고 계신가요? 그렇다면 어떤 단계를 따르고 있는지, 그리고 어떤 오류가 표시되는지 알려주시면 감사하겠습니다.

맞아요 - /var/discourse/에서 git pull을 실행해야 했어요.

재빌드 과정에서 git pull이 수행되지 않은 것 같아서, 여전히旧的 빌더 등을 사용하고 있었거든요.