π Vite error when opening project preview in a new tab
theetrain opened this issue Β· comments
Describe the bug
When running a SvelteLab project in the workspace editor and preview pane, everything runs smoothly. When opening the preview pane in a new tab, Vite throws an error:
Error:
line
must be greater than 0 (lines start at line 1)
at originalPositionFor$1 (/home/httpswwwsveltelabdev dcnb/node_modules/vite/dist/node/chunks/dep-df561101.js:10179:19)
The only similar issue I could find is here: sveltejs/kit#3638
Reproduction
- Go to https://www.sveltelab.dev/m9sq9hiyjbk1okq
- After Vite starts, open preview window in a new tab
- Observe error
Expected behavior
It should continue to run normally without breaking.
Screenshots
Additional context
When downloading the reproduction above and running locally, it seems to work well.
I found this myself and started investigating without much success...the error is kinda swallowed by vite if I understand this correctly. Basically vite tries to re"position" an already repositioned error and launches this. I have to investigate this further, thanks for reporting an official issue
Just to report...I think this is an issue with our default templates...I have to investigate this a bit further
This very issue has been addressed for newer projects. If you have an old project that you want to make work just create a static/favicon.png
or static/favicon.ico
depending on what's in app.html
(if there's no link icon go with favicon.ico
.
However the dev server still crashes whenever there's a server error and i have to figure out why.