Rebuild failure - possibly related to rolldown?

Hi everyone, I have just tried a rebuild using discourse/base:2.0.20260617-0053. However, I am getting a few errors related to missing tsconfigs for packages?

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.

I’ve tried nuking node modules and manual pnpm install but no joy. I also tried pnpm approve-builds in the container but it stated there are no packages to approve? I also tried all the usual git pull etc to ensure the base image is up to date.

Has anyone else came across this issue? I have completed a rebuild using this image for another forum and it was successful. I attempted the rebuild using ./launcher rebuild app

Any news on this or steps to allow the rebuild to proceed? Thanks!

Do you have any plugins installed?

No, only the usual official discourse ones

Hi @tanya_byrne, are you running the ‘latest’ version of discourse, under a standard install?

Are you aware of any significant differences between the two machines/forums?

It looks like this error could be caused by running rm -rf on a core plugin. That’s a very risky thing to do - all of Discourse’s testing is done with all the core plugins present. So I’d recommend removing that line from your app.yml.

That said, we can improve this asset-processor build so that it doesn’t break so catastrophically:

David, then how do we override templates in core plugins without first deleting a core plugin and then replacing it with a forked version? Is that not safe? Can assets remain that reflect the original?

I’ve successfully followed this approach before when there was simply no other option.

Overriding templates isn’t a ‘supported’ thing.

Of course, you can do it at your own risk, and it’ll ‘probably’ be fine. But it’s not something we can guarantee or test for.

I appreciate that you’ve made it less problematic here though!

I just wish that we could maintain a situation where plugins remained completely modular where this was possible.

This was indeed the issue. Do you have any recommendations for hiding/removing these plugins as I feel like removing plugins that we don’t use shouldn’t break the build, as plugins are supposed to be modular.

The ‘supported’ way is to disable the plugins via the admin UI.

You’re free to delete them on the filesystem, and it’ll “probably” work (as you say, ideally plugins should be modular). But it’s not something we rigourously test at the moment, so I can’t provide a 100% guarantee on it.

Thanks David, appreciate the guidance.

I totally share your opinion.

It makes sense to me that you should be able to 100% hide plugins from the Admin interface (by default) to reduce clutter (not simply disable them)

Plugins should very definitely be modular.

Whilst I respect there are sometimes technical considerations, this imho should be the ultimate goal.

But let’s also celebrate the fact that this bundling has facilitated much much faster builds :rocket: