You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[vite-plugin-svelte] Cannot read property 'split' of undefined
file: src/routes/__layout.svelte
Cannot read property 'split' of undefined
This was impossible to track down.
This turned out to be a bug in svelte-preprocess that appears to have been recently fixed. It happens if you have svelte-preprocess 4.9.0 with the following code:
It would be really nice to get a stack trace. I'm not sure why that was being swallowed and I was just getting the error message
Alternatives considered
We could put a try / catch around the call to preprocess to at least make it clear that's where it's coming from. svelte core could also do some type of reporting when a preprocessor fails. Neither solution would be as helpful as a stack trace though
Importance
would make my life easier
The text was updated successfully, but these errors were encountered:
There wouldn't be a frame in this particular case because that's something the Svelte compiler has to explicitly add and this was an unexpected error from a bug in svelte-preprocess. Maybe if there was a syntax error or something though
Describe the problem
I was getting the error message:
This was impossible to track down.
This turned out to be a bug in
svelte-preprocess
that appears to have been recently fixed. It happens if you havesvelte-preprocess
4.9.0 with the following code:Here's a commit where it was happening: svelte-society/sveltesociety.dev@78cdfa1. You can reproduce with
npm run build
Describe the proposed solution
It would be really nice to get a stack trace. I'm not sure why that was being swallowed and I was just getting the error message
Alternatives considered
We could put a try / catch around the call to preprocess to at least make it clear that's where it's coming from.
svelte
core could also do some type of reporting when a preprocessor fails. Neither solution would be as helpful as a stack trace thoughImportance
would make my life easier
The text was updated successfully, but these errors were encountered: