-
Notifications
You must be signed in to change notification settings - Fork 108
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
ReferenceError: self is not defined after migrating to sveltekit2 #526
Comments
How did you encounter this? By upgrading sveltekit? Was it working with the
previous version of sveltekit (or the lib)? Which line is it complaining
about (can you click into it)?
In general SSR should ignore the lib altogether
…On Sat, Dec 16, 2023, 19:19 NoobMaster19 ***@***.***> wrote:
Here's a shortened form of the error:
4:16:44 PM [vite] Error when evaluating SSR module
...
ReferenceError: self is not defined
at ...***@***.******@***.***/node_modules/svelte-dnd-action/dist/index.js:4:23
at ...***@***.******@***.***/node_modules/svelte-dnd-action/dist/index.js:5:2
at instantiateModule
—
Reply to this email directly, view it on GitHub
<#526>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4OZC6YFHJLYWIDPTVHMHLYJVKRJAVCNFSM6AAAAABAXNULCKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2DINRWGA4DENY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
+1 getting the same [vite] Error when evaluating SSR module |
down grading from 0.9.34 to 0.9.33 helps but gives this warning [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte. svelte-dnd-action@0.9.33 Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details. |
@Rar9 yeah that's the warning 0.9.34 was supposed to fix. checking what this new error is about |
I don't have time to get to the bottom of this now (hopefully tomorrow). The lib itself doesn't use "self" (it does use "window" quite a lot) so this error has to do with the code that rollup adds (the irony :)) as can be seen here. Version 0.9.33 has that too, see here so I am not sure why it doesn't trigger the same error. This wasn't a problem with Sveltekit 1 so very strange indeed. I will try to make some time for this tomorrow. If anyone knows the solution please do let me know :) |
okay, it was a silly mistake i made. please used 0.9.35 |
your new updated works, iconify/svelte has the same issue ReferenceError ... what did u change? |
I added this to package.json:
Notice that it should point to |
Here's a shortened form of the error:
The text was updated successfully, but these errors were encountered: