Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })
See original GitHub issueDescribe the bug
Locally dev and preview works fine, it even build fine for Cloudlfare Pages.
However, when attempting to access the page, the following error is displayed, with status code 500:
Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })
Im not sure if I was able to pinpoint where the issue lies, but when going back from next (1.0.0-next.8)
to 1.0.0-next.7
would make accessing properly again.
Reproduction
I had the following svelte.config.js
import cloudflare from '@sveltejs/adapter-cloudflare';
import preprocess from 'svelte-preprocess';
export default {
preprocess: preprocess(),
kit: {
target: '#svelte',
adapter: cloudflare({
// any esbuild options
})
}
};
Building for version next (1.0.0-next.8)
on Cloudflare Pages and deploying it, would result in the non-functional site.
Logs
`Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })`
System Info
npx: installed 1 in 2.476s
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
Memory: 12.00 GB / 31.94 GB
Binaries:
Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
Browsers:
Chrome: 96.0.4664.110
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.62)
Internet Explorer: 11.0.19041.1202
npmPackages:
@sveltejs/adapter-cloudflare: 1.0.0-next.7 => 1.0.0-next.7
@sveltejs/kit: next => 1.0.0-next.232
svelte: ^3.44.0 => 3.46.2
Severity
serious, but I can work around it
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Static adapter throwing "Using @sveltejs ... - Stack Overflow
The problem was that the hook.ts file scaffolded by a previous version of svelte kit was not compatible with the new version. Long...
Read more >Bottle - Read the Docs
The route() decorator binds a piece of code to an URL path. ... strings and returned to the browser with the Content-Type header...
Read more >next js unhandled runtime error - You.com | The AI Search ...
I have encountered this error before when using Next JS, and it happened to me when I was trying to display an object...
Read more >Express.js Guide - Pepa
Removing Deprecated Methods from Express.js 4 Apps . . ... This will download and link $ express terminal command to the proper path...
Read more >Read Aura Framework v2 | Leanpub
We are going to install aura/framework-project , so we can show command line examples also. ... To create a route, call the add()...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was also experiencing this error. I was able to resolve it by updating “@sveltejs/kit” to “^1.0.0-next.239”, “@sveltejs/adapter-cloudflare” to “^1.0.0-next.8”, and Node to v16.13.2
I ran into the same issue deploying to Netlify and downgrading Sveltekit to
"^1.0.0-next.239"
fixed the issue. Thank you.