빌드 실패 - rolldown과 관련이 있을까요?

안녕하세요 여러분, 방금 discourse/base:2.0.20260617-0053를 사용하여 리빌드를 시도해 보았습니다. 그런데 패키지의 tsconfig가 누락되었다는 관련 오류가 몇 개 발생하고 있습니다.

Got some warnings
╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: core-js@2.6.12, core-js@3.49.0, lefthook@2.1.9,     │
│   rete@2.0.6.                                                                │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 10.4s using pnpm v10.28.0
Lockfile is up to date, resolution step is skipped
Already up to date

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: core-js@2.6.12, core-js@3.49.0, lefthook@2.1.9,     │
│   rete@2.0.6.                                                                │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
.....
Successfully installed aws-sdk-translate-1.35.0
1 gem installed
rake aborted!
Discourse::Utils::CommandError: pnpm -C=frontend/asset-processor node build.mjs (Discourse::Utils::CommandError)
file:///var/www/discourse/node_modules/.pnpm/rolldown@1.1.2/node_modules/rolldown/dist/shared/error-T-E9reEy.mjs:48
        const wrapper = new Error(summary);
                        ^

Error: Build failed with 9 errors:

[RESOLVE_ERROR] Could not resolve './shims' in transpiler.js
   ╭─[ transpiler.js:1:8 ]
   │
 1 │ import "./shims";
   │        ────┬────
   │            ╰────── Tsconfig not found
───╯

[RESOLVE_ERROR] Could not resolve './postcss' in transpiler.js
   ╭─[ transpiler.js:2:8 ]
   │
 2 │ import "./postcss";
   │        ─────┬─────
   │             ╰─────── Tsconfig not found
───╯

[RESOLVE_ERROR] Could not resolve './asset-processor-rollup' in transpiler.js
   ╭─[ transpiler.js:3:8 ]
   │
 3 │ import "./asset-processor-rollup";
   │        ─────────────┬────────────
   │                     ╰────────────── Tsconfig not found
───╯

[RESOLVE_ERROR] Could not resolve '@babel/standalone' in transpiler.js
   ╭─[ transpiler.js:4:45 ]
   │
 4 │ import { transform as babelTransform } from "@babel/standalone";
   │                                             ─────────┬─────────
   │                                                      ╰─────────── Tsconfig not found
───╯

[RESOLVE_ERROR] Could not resolve 'decorator-transforms' in transpiler.js
   ╭─[ transpiler.js:5:33 ]
   │
 5 │ import DecoratorTransforms from "decorator-transforms";
   │                                 ───────────┬──────────
   │                                            ╰──────────── Tsconfig not found
───╯
/var/www/discourse/lib/discourse.rb:180:in 'Discourse::Utils::CommandRunner#execute_command'
/var/www/discourse/lib/discourse.rb:146:in 'Discourse::Utils::CommandRunner#exec'
/var/www/discourse/lib/discourse.rb:33:in 'Discourse::Utils.execute_command'
/var/www/discourse/lib/asset_processor.rb:58:in 'AssetProcessor.build_asset_processor'
/var/www/discourse/lib/asset_processor.rb:107:in 'block in AssetProcessor.load_or_build_processor_source'
/var/www/discourse/lib/asset_processor.rb:86:in 'block in AssetProcessor.with_file_lock'
/var/www/discourse/lib/asset_processor.rb:84:in 'IO.open'
/var/www/discourse/lib/asset_processor.rb:84:in 'AssetProcessor.with_file_lock'
/var/www/discourse/lib/asset_processor.rb:103:in 'AssetProcessor.load_or_build_processor_source'
/var/www/discourse/lib/tasks/assets.rake:161:in 'block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/exe/rake:27:in '<top (required)>'
/usr/local/bin/bundle:25:in 'Kernel#load'
/usr/local/bin/bundle:25:in '<main>'
Tasks: TOP => db:migrate => assets:precompile:asset_processor
(See full trace by running task with --trace)
19:signal-handler (1782860705) Received SIGTERM scheduling shutdown...
I, [2026-06-30T23:05:05.686770 #1]  INFO -- : Terminating async processes
I, [2026-06-30T23:05:05.686855 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 19
19:M 30 Jun 2026 23:05:05.697 * User requested shutdown...
19:M 30 Jun 2026 23:05:05.697 * Saving the final RDB snapshot before exiting.
19:M 30 Jun 2026 23:05:05.743 * DB saved on disk
19:M 30 Jun 2026 23:05:05.743 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3131 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'
exec failed with the params {"cd" => "$home", "tag" => "migrate", "hook" => "db_migrate", "cmd" => ["su discourse -c 'bundle exec rake db:migrate'"]}
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.

node modules를 삭제하고 수동으로 pnpm install을 시도해 보았지만 효과가 없었습니다. 컨테이너에서 pnpm approve-builds를 실행해 보았지만 승인할 패키지가 없다고 표시되었습니다. 또한 베이스 이미지가 최신 상태인지 확인하기 위해 git pull 등 일반적인 작업도 모두 시도해 보았습니다.

이 문제를 경험해 보신 분이 계신가요? 이 이미지를 사용하여 다른 포럼에 대해 리빌드를 완료했을 때는 성공적이었습니다. ./launcher rebuild app을 사용하여 리빌드를 시도했습니다.

이 문제에 대해 새로운 소식이나 재구성을 진행할 수 있는 단계가 있을까요? 감사합니다!

플러그인이 설치되어 있나요?

아니요, 일반적인 공식 담론 관련 내용만 있습니다.

@tanya_byrne님, 표준 설치 환경에서 discourse의 ‘latest’ 버전을 실행 중이신가요?

두 기계/포럼 사이에 중대한 차이가 있는지 알고 계신가요?

이 오류는 코어 플러그인에 대해 rm -rf를 실행한 것이 원인이 될 수 있습니다. 이는 매우 위험한 작업입니다. Discourse의 모든 테스트는 코어 플러그인이 모두 존재하는 상태에서 수행되므로, app.yml 파일에서 해당 줄을 제거하는 것을 권장합니다.

그럼에도 불구하고, 자산 프로세서 빌드가 이렇게 치명적으로 깨지지 않도록 개선할 수 있습니다:

데이비드, 그렇다면 코어 플러그인의 템플릿을 오버라이드하려면 먼저 코어 플러그인을 삭제한 후 포크된 버전으로 교체해야 하나요? 그렇게 하면 안전하지 않나요? 원래 상태를 반영하는 에셋이 남아 있을 수 있나요?

이전에는 다른 선택지가 전혀 없을 때 이 방법을 성공적으로 사용해 본 적이 있습니다.

템플릿 오버라이드는 '지원’되지 않는 기능입니다.

물론, 책임은 본인에게 있지만 시도해 볼 수 있으며, ‘아마’ 문제가 없을 것입니다. 하지만 우리는 이를 보장하거나 테스트할 수는 없습니다.

그래도 여기서는 문제가 덜 발생하도록 개선해 주셔서 감사합니다.

가능하다면 플러그인이 완전히 모듈화된 상태를 유지할 수 있으면 좋겠습니다.

정말 그 문제가 맞았습니다. 사용하지 않는 플러그인을 제거해도 빌드가 깨지지 않는 것이 플러그인의 모듈성 원칙에 부합한다고 생각하는데, 이러한 플러그인을 숨기거나 제거하는 데 대해 추천해 주실 방법이 있을까요?

‘지원되는’ 방법은 관리자 UI를 통해 플러그인을 비활성화하는 것입니다.

파일 시스템에서 플러그인을 삭제하는 것도 가능하며, ‘아마도’ 작동할 것입니다(말씀하신 대로, 이상적으로는 플러그인이 모듈형이어야 하므로). 하지만 현재 이를 엄격하게 테스트하고 있지 않아 100% 보증은 드릴 수 없습니다.

데이비드, 조언 감사드립니다.

완전히 동의합니다.

관리자 인터페이스에서 플러그인을 기본적으로 100% 숨길 수 있어야 한다는 생각에 공감합니다. 이렇게 하면 화면이 덜 복잡해지죠(단순히 비활성화하는 것이 아니라 말입니다).

플러그인은 확실히 모듈식으로 구성되어야 합니다.

때로는 기술적인 고려 사항이 있다는 점은 존중하지만, 제 생각에는 이것이 궁극적인 목표가 되어야 합니다.

하지만 이 번들링 덕분에 빌드가 훨씬, 훨씬 빨라졌다는 사실도 함께 기뻐합시다. :rocket: