Skip to content
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

Vite with vite-plugin-checker plugin don't exit the process after finishing bun run build #9998

Closed
adrifer opened this issue Apr 5, 2024 · 3 comments · Fixed by #11379
Closed
Labels
bug Something isn't working needs investigate Needs to be investigated to find the root cause

Comments

@adrifer
Copy link

adrifer commented Apr 5, 2024

What version of Bun is running?

1.1.1+ca1dbb4eb

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

Repro here: https://github.com/adrifer/BunBuildRepro

These are the steps to follow on that repo:

bun install
bun run build

What is the expected behavior?

bun run build should finish when everything is complete

What do you see instead?

Most of the times, after succeeding one of the two build steps, it gets stuck and nothing happen. I think the process doesn't exit. This works fine with yarn and npm.
image
It gets stuck and process doesn't exit after finishing the build step.

Additional information

When using the Dockerfile to build the image I can repro it every time.

@adrifer adrifer added the bug Something isn't working label Apr 5, 2024
@adrifer adrifer changed the title Running a bun run build script get stuck when it finishes Running a bun run build script get stuck when it finishes and doesn't exit Apr 5, 2024
@robobun robobun changed the title Running a bun run build script get stuck when it finishes and doesn't exit Running a bun run build script get stuck when it finishes and doesn't exit Apr 5, 2024
@adrifer
Copy link
Author

adrifer commented Apr 6, 2024

I've just tested with bun v1.1.2 and the issue is still there.

@adrifer adrifer changed the title Running a bun run build script get stuck when it finishes and doesn't exit Vite with vite-plugin-checker plugin don't exit the process after finishing bun run build Apr 8, 2024
@Electroid Electroid added the needs investigate Needs to be investigated to find the root cause label Apr 8, 2024
@adrifer
Copy link
Author

adrifer commented Apr 8, 2024

After some more debugging I found the issue is related to this vite pluging: vite-plugin-checker

Basically, when adding the "checker" plugin to vite.config I can repro it:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import checker from "vite-plugin-checker";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    react(),
    checker({
      typescript: true,
    })
  ],
});

Removing the checker line in the vite.config plugins, solves the issue.

I've updated my repro to simplify it and only add this plugin to a clean bun create vite: https://github.com/adrifer/BunBuildRepro

@vijayprasanna13
Copy link

I have the same issue on v1.1.8 as well when running bun run build inside a docker container. I can see the ✓ built in 22.00s log being printed but the process never exits.

Screenshot 2024-05-20 at 3 31 53 PM

Removing the checker plugin from my vite.config.ts fixed the issue for me -

plugins:  [
   react(),
   // checker({
   //      typescript: true,
   //    })
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigate Needs to be investigated to find the root cause
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants