-
-
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
Uncaught error on startup: Cannot read env of undefined #12771
Comments
After further looking into this, it seems like this might be a cache / cdn issue. The file |
I have isolated the issue and updated the issue to contain reproduction steps. Issue is that the key changes when package.json changes, but the filename doesnt change so it has become mutable. |
Encountered the same problem recently, fixed by enabling "Disable Cache" in browser dev tools for each CI build of a commit |
Describe the bug
After updating sveltekit from 2.6.2 to 2.6.3, the build version of the app is broken on startup with the following error
The code that is running is
I can see that
globalThis.__sveltekit_1n0gls
doesn't exist, butglobalThis.__sveltekit_aqr0w
does. So it seems like somehow the keys gets mixed up in the build. I suspect introduced in #12700Reproduction
globalThis.__sveltekit_*
inclient/_app/immutable/chunks/entry.*.js
entry.*.js
file has not changed filename (same key), but thatglobalThis.__sveltekit_*
has changed key, so the file has become mutableThe build is still valid by itself, but if application is served behind a cdn, the old file will be served since filename doesnt change.
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: