-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: rsbuild build command does not exit when ran inside docker using bun. #7067
Comments
If your environment has node.js installed, a smaller reproduceconst rspack = require('@rspack/core');
rspack({ mode: 'none' }).run((err) => console.log({err})); running it via bun, the process will keep running after internally called How to escaperspack// rspack.config.js
module.exports = {
plugins: [
{
apply(compiler) {
compiler.hooks.done.tap("quit", () => {
if (typeof Bun !== 'undefined') {
process.exit(process.exitCode || 0);
})
});
},
},
],
}; rsbuildexport default defineConfig({
// ...
plugins: [
{
setup: (api) => {
api.onAfterBuild(({ isFirstCompile, stats }) => {
if (typeof Bun !== 'undefined') {
process.exit(process.exitCode || 0);
}
});
},
},
],
// ...
}) |
@xc2 seems bun's compatible issue? |
Thank you! Installing nodejs with alpine package manager fixed this issue. Cheers!:) |
System Info
Docker images tested: fedora:latest, oven/bun:1, oven/bun:debian, oven/bun:alpine. All on linux/amd64.
Details
When running
bun run build
which invokesrsbuild build
, the project (a TypeScript React app created withbun create rsbuild@latest
) is built correctly but the process does not exit and is stuck at the following forever:This only occurs when the command is executed within a docker container and works fine outside of docker. I will also report this at bun as I am not sure who's the one responsible for a fix.
Workaround
Currently I just send the command to the background and add a generous sleep like this:
Reproduce link
No response
Reproduce Steps
bun create rsbuild@latest
.docker build -t my-container .
bun run build
and "never reached" is never printed.The text was updated successfully, but these errors were encountered: