./launcher rebuild app error: bootstrap failed with exit code 234

The error is due to a mismatch between yarn and pnpm . The failure is specifically due to:
EINVAL: invalid argument, rmdir '/var/www/discourse/app/assets/javascripts/dialog-holder/node_modules/.bin'

Suggested Steps:

  1. Manually remove Node Modules: rm -rf node_modules app/assets/javascripts/*/node_modules
  2. Run cleanup: ./launcher cleanup
  3. Rebuild Discourse: ./launcher rebuild app