-
Notifications
You must be signed in to change notification settings - Fork 5
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
Svelte errors from jsdom attempting to run code after tossr promise returns #14
Comments
@mizzao I'm afraid your guess is as good as mine - probably even better 😳. Did you get a reply in the |
Good call, I will do some digging on how others deal with this and get back to you. |
Possibly related: sveltejs/svelte#3327, though I can't figure out for the life of me what is possibly trying to No leads on debugging jsdom's eval so far. |
Interesting data point: after bumping Routify to 2.13.1 and tossr to 1.4.2 (implying the correspond bump in esbuild), the error changed:
The jsdom version didn't change, so what is generating this code that causes it to print out differently? |
Okay, this seems to come from the https://github.com/sveltejs/svelte code. On the latest version, 3.35.0, Here are occurrences of
Do you find it strange that |
This function seems to be the problem: https://github.com/sveltejs/svelte/blob/master/src/runtime/internal/dev.ts#L4
So, |
Okay, this is weird. If I put Document {
location: [Getter/Setter],
[Symbol(DOM SymbolTree)]: SymbolTreeNode {
parent: null,
previousSibling: null,
nextSibling: null,
firstChild: null,
lastChild: null,
childrenVersion: 0,
childIndexCachedUpTo: null,
cachedIndex: -1,
cachedIndexVersion: NaN
}
} here |
Ok, this is interesting...check out the where the
So, after the |
Sorry for leaving you hanging @mizzao. Not sure how I missed all the comments, but you're way ahead of me 😅
If we use
|
Now that tossr is printing out errors properly (#11), it can still be hard to debug because they look like this:
Is this because jsdom is running everything in an
eval
? If so, is there any way to bubble up the underlying code? Because it's really hard to see what line this error is referring to 😁. There is nodispatchEvent
in my code so I think it might even be from a Svelte timing issue.The text was updated successfully, but these errors were encountered: