Closed tsukhu closed 3 years ago
Line 3 of the logs you posted includes Unexpected token < in JSON at position 0
. That looks like the getFetchResults
function is expecting JSON but somehow receiving HTML. Is there any way you can extract the HTML in question from your logs, or grab it from your browser's Network tab during a reproduction? Its contents might be an additional clue to troubleshooting this error.
Here is the HTML from http://localhost:3000/worldmap
We get a 404 during fetch in SSR mode
Same problem
Perhaps I'm misunderstanding how this code works, but wouldn't if (resolved.startsWith(options.paths.base /* '' */))
always be true for those who use the default options.paths.base
?
(changed in 7b440b2bc39ef4bc30d1b3f465f83ac512edcd1e)
I changed to this and everything seems to be working now.
- } else if (resolved.startsWith(options.paths.base)) {
+ } else if (resolved.startsWith(options.paths.base || '/')) {
Same here. fetch
gives 404
when I run in load
but works in other places (eg. in onMount
).
"@sveltejs/kit": "^1.0.0-next.132"
reverting to 1.0.0-next.131
fixed it
@tsukhu your repro doesn't work for me. I get Cannot read property 'FIREBASE_API_KEY' of null
I applied @babeard's fix and released it, but it caused a new issue https://github.com/sveltejs/kit/issues/1982
@tsukhu your repro doesn't work for me. I get
Cannot read property 'FIREBASE_API_KEY' of null
@benmccann apologies for that as the app was using environment variables. But I can confirm the 133 version fixed the issue for me. Thank you . Will try out the new updates as well
Describe the bug
Version @sveltejs/kit@1.0.0-next.132 is causing load() related issues .
This function was working fine for async load till this new version.
On execution this gives the following error on the server side
Reproduction
issue
branch. The only change from the main branch is that it has the new version of sveltekit1.0.0-next.132
(main branch uses 1.0.0-next.131)npm i
npm run dev
http://localhost:3000/worldmap
. This will generate the error on the server side.If you follow the same steps on the
main
branch of the project it works fine and is also deployed on vercel https://sveltekit-demo-psi.vercel.app/Logs
System Info
Severity
blocking an upgrade
Additional Information
Looks like even the vercel deployment fails . See log here
No response