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/SvelteKit failed to load config from vite.config.ts: The service was stopped, after running bun install or bun add #16968

Open
VityaSchel opened this issue Feb 1, 2025 · 1 comment
Labels
bug Something isn't working ecosystem Something that relates to package or framework compatibility node.js Compatibility with Node.js APIs

Comments

@VityaSchel
Copy link

What version of Bun is running?

All versions for the past half of year, currently on 1.2.1 still occurs

What platform is your computer?

Darwin 24.1.0 arm64 arm but it appears that this also happens on WSL

What steps can reproduce the bug?

  1. Create sveltekit project with bun
  2. Install all dependencies
  3. Run it once, Vite caches dependencies
  4. Install new dependency via bun install or bun add or bun remove (or aliases)
  5. Now when you try to run bun dev you'll get:
failed to load config from /path/to/project/vite.config.ts
error when starting dev server:
Error: The service was stopped
    at <anonymous> (/path/to/project/node_modules/esbuild/lib/main.js:968:38)
    at <anonymous> (/path/to/project/node_modules/esbuild/lib/main.js:622:9)
    at afterClose (/path/to/project/node_modules/esbuild/lib/main.js:613:25)
    at emit (node:events:84:22)
    at endReadableNT (internal:streams/readable:862:50)
    at processTicksAndRejections (native:7:39)
error: script "dev" exited with code 1

What is the expected behavior?

Expected to run as with node.js runtime

What do you see instead?

The common fix is to delete node_modules and run bun install again. Many people are experiencing the issue in this discussion: vitejs/vite#17851

Additional information

Please do not close this issue or link me to a single place where it's tracked. Currently it seems that this discussion in Vite's repository is the only place where it's tracked. This has been happening for many months now and no fix or workaround aside from deleting node_modules was introduced.

Related issues:

@VityaSchel VityaSchel added bug Something isn't working needs triage labels Feb 1, 2025
@Cluster2a
Copy link

Same problem here, using docker:

Image

@RiskyMH RiskyMH added node.js Compatibility with Node.js APIs ecosystem Something that relates to package or framework compatibility and removed needs triage labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ecosystem Something that relates to package or framework compatibility node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

3 participants