-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Describe the bug
After upgrading to version 6, a hot reload in the development environment leads to a server crash without recovery.
Reproduction
vite.new
Steps to reproduce
- running the sever locally using:
pnpm remix vite:dev
- go to any path for example /health -> should return OK
- trigger save in vite.config.ts -> should trigger server restart ([vite] server restarted)
- go to any path again /health , now it will return 500 with an error "Vite module runner has been closed"
revert to Vite 5.4.11 to fix the issue.
System Info
System:
OS: macOS 15.1.1
CPU: (12) arm64 Apple M4 Pro
Memory: 1.01 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
pnpm: 9.15.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 131.0.6778.140
Safari: 18.1.1
npmPackages:
vite: ^6.0.3 => 6.0.3
Used Package Manager
pnpm
Logs
Error: Vite module runner has been closed.
at SSRCompatModuleRunner.getModuleInformation (file:///app/node_modules/.pnpm/vite@6.0.3_@types+node@20.17.6_jiti@1.21.6_sass@1.80.6_terser@5.36.0_tsx@4.19.2_yaml@2.6.0/node_modules/vite/dist/node/module-runner.js:1196:13)
at SSRCompatModuleRunner.cachedModule (file:///app/node_modules/.pnpm/vite@6.0.3_@types+node@20.17.6_jiti@1.21.6_sass@1.80.6_terser@5.36.0_tsx@4.19.2_yaml@2.6.0/node_modules/vite/dist/node/module-runner.js:1186:21)
at SSRCompatModuleRunner.import (file:///app/node_modules/.pnpm/vite@6.0.3_@types+node@20.17.6_jiti@1.21.6_sass@1.80.6_terser@5.36.0_tsx@4.19.2_yaml@2.6.0/node_modules/vite/dist/node/module-runner.js:1110:38)
at instantiateModule (file:///app/node_modules/.pnpm/vite@6.0.3_@types+node@20.17.6_jiti@1.21.6_sass@1.80.6_terser@5.36.0_tsx@4.19.2_yaml@2.6.0/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:30569:31)
at requestHandler (/app/node_modules/.pnpm/@remix-run+server-runtime@2.15.0_typescript@5.6.3/node_modules/@remix-run/server-runtime/dist/server.js:65:44)
at /app/node_modules/.pnpm/@remix-run+express@2.15.0_express@4.21.1_typescript@5.6.3/node_modules/@remix-run/express/dist/server.js:41:22
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.