-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
static-adapter
and vite build --watch
crashes if triggered while building.
#10809
Comments
static-adaper
and vite build --watch
crashes if triggered while building.static-adapter
and vite build --watch
crashes if triggered while building.
The reproduction repository only has a README.md file. I can't reproduce the issue. |
Forgot to commit the files! Pushed to the repo. |
Thanks! However, I can't reproduce the same issue. I'm getting a different error instead when saving twice. Error: ENOENT: no such file or directory, unlink '/home/projects/github-uq4xbd/.svelte-kit/output/client/vite-manifest.json'
at Object.unlinkSync (https://githubuq4xbd-rtoo.w-credentialless.staticblitz.com/blitz.5e765aa0.js:49:22024)
at finalise (file:///home/projects/github-uq4xbd/node_modules/@sveltejs/kit/src/exports/vite/index.js:827:22)
at Object.handler (file:///home/projects/github-uq4xbd/node_modules/@sveltejs/kit/src/exports/vite/index.js:854:21)
at eval (file:///home/projects/github-uq4xbd/node_modules/rollup/dist/es/shared/node-entry.js:25569:40)
at async PluginDriver.hookParallel (file:///home/projects/github-uq4xbd/node_modules/rollup/dist/es/shared/node-entry.js:25491:17)
at async Object.close (file:///home/projects/github-uq4xbd/node_modules/rollup/dist/es/shared/node-entry.js:26751:13) {
syscall: 'unlink',
errno: -2,
code: 'PLUGIN_ERROR',
path: '/home/projects/github-uq4xbd/.svelte-kit/output/client/vite-manifest.json',
pluginCode: 'ENOENT',
plugin: 'vite-plugin-sveltekit-compile',
hook: 'closeBundle'
} The above should be fixed in the next release because of #10782 . In that PR, we no longer try to delete the vite-manifest file. |
Tried cloning the repo again and got the same error regarding I think we should wait for the next release and see if it fixes this issue |
I have a feeling it would still occur when it tries to read |
It is definitely something racing. I tried to reproduce again and most of the time I get error Perhaps patching with #10782 would make it easier to reproduce. |
@RonniSkansing the patch is out in the latest release of Kit. Can you provide an update on the frequency of the errors? |
Thanks for updating me @s3812497 After updating and with a fresh clone of the bug repo, I constantly get the error
However I have another repo, that is set up in the same way with a
but I am not sure why they give different errors. I think it would be best to investigate the first mentioned error with https://github.com/RonniSkansing/svelte-vite-builld-watch-bug I have updated the package.json and pushed, so hopefully it should be possible to reproduce now. |
Thanks for the additional logs. That narrows down the error to |
Thanks for investigating, I can confirm that I do not get any crashes when not using a fallback page, so I will do that for now. |
A temp work around is running the watch command in a loop. It is not optimal, but it makes it easier to develop until a fix is made. Example: while true; do \
npm run build-watch; \
echo "Process crashed! Restarting..."; \
done |
Describe the bug
vite build --watch
crashes the processes due a unhanded error if I save while a build is running when usingstatic-adapter
.Reproduction
https://github.com/RonniSkansing/svelte-vite-builld-watch-bug
To reproduce, clone the repo, run
npm run build-watch
and save twice in template file or js file.The expected behavior is rebuild twice, the result is a crash.
Logs
System Info
Severity
annoyance
Additional Information
I am using
vite build --watch
so I can develop while another program is serving the static project.Any work arounds would also be appreciated.
The text was updated successfully, but these errors were encountered: