Netlify: Request with GET/HEAD method cannot have body
See original GitHub issueDescribe the bug
Hello,
I updated to kit 234 & auto adapter 13 this morning and upon deploying to netlify I ran into the attached issue.
After asking in discord and trying a few things i have been unable to resolve it.
I then created a reproduction using the skeleton starter and managed to confirm the issue again. This may very well be down to a breaking change in https://github.com/sveltejs/kit/pull/3384
Happy to give more info if need be!
Reproduction
https://github.com/mattpilott/kit
Logs
{
"errorType": "TypeError",
"errorMessage": "Request with GET/HEAD method cannot have body",
"trace": [
"TypeError: Request with GET/HEAD method cannot have body",
" at new Request2 (/var/task/.netlify/functions-internal/render.js:5262:17)",
" at Runtime.handler (/var/task/.netlify/functions-internal/render.js:7048:39)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
System Info
System:
OS: macOS 12.1
CPU: (8) arm64 Apple M1
Memory: 76.42 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.3.1 - /opt/homebrew/bin/node
npm: 8.3.1 - /opt/homebrew/bin/npm
Browsers:
Chrome: 97.0.4692.71
Firefox: 96.0.1
Safari: 15.2
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.13
@sveltejs/kit: next => 1.0.0-next.234
svelte: ^3.44.0 => 3.46.2
Severity
blocking an upgrade
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
My POST request is failing with a 'Request with GET/HEAD ...
I've got my answer in the comments but just posting an answer just in case someone else is facing 'REQUEST WITH GET/HEAD METHOD'...
Read more >Get started with the Netlify API
Use our REST API to interact with our platform. Learn the basics for using the API, instructions for deploying sites, and notes on...
Read more >Can I send HTTP GET request with body from browser?
TypeError: HEAD or GET Request cannot have a body. Safari 12. TypeError: Request has method 'GET' and cannot have a body.
Read more >HTTP Request Methods – Get vs Put vs Post Explained with ...
Client-server architecture; APIs. By the end of this article you'll have a good understanding of the functions of each request method. You'll ...
Read more >Failed to execute 'fetch' on 'Window': Request with GET cannot ...
Resolutions steps and guidelines for error "Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have the body".
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’ve tried all these variations:
Setting NODE_VERSION env variable in Netlify Dashboard UI to 14 and 16 (but not 17)
Setting Node version in netlify.toml to 14 and 16 (but not 17)
Setting netlify.toml:
Currently my package.json has:
Currently Netlify env in the UI has only:
AWS_LAMBDA_JS_RUNTIME = nodejs14.x
My deploy is here: https://61e989e221b6fd00070a45cd--excel-demo-012.netlify.app
Also you dont need adapter auto and netlify one or the other is fine
I dont think your issue is related to this one btw, maybe it should be its own ticket if you cant resolve