Using "nodejs10.x" as runtime in config causes 502 BAD_GATEWAY error
See original GitHub issueIn the readme the following is stated:
“You can change the AWS lambda runtime from the default node 8
Example now.json
”
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "now-sapper",
"config": {
"runtime": "nodejs10.x"
}
}
]
}
But when I add the nodejs 10.x runtime, deploy with now
and access the site online, I get an “502: BAD_GATEWAY” error with “Code: NO_STATUS_CODE_FROM_FUNCTION”
I found out that in the demo repo here: https://github.com/beyonk-adventures/now-sapper-demo there is no runtime config added. After removing it, everything worked.
Just stating this in case anybody else runs into this and to maybe update the docs.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Node.js 502 Bad Gateway Issues and How To Resolve Them
In December of 2018, many Node.js users noticed that their applications randomly returned an HTTP status code 502 "Bad Gateway" error.
Read more >502 Bad Gateway error for my server running with Node JS on ...
502 errors are generally caused by NGINX being unable to pass a request to "upstream", in this case your Node.js server (which is...
Read more >How To Fix a 502 Bad Gateway Error - Kinsta
The 502 bad gateway error specifically means that server received an invalid response from an inbound server. Check out these common causes ......
Read more >502 Bad Gateway Error: What It Is and How to Fix It
This means that the server creating the 502 Error is acting as a gateway. Let's take a moment to discuss what a gateway...
Read more >502 Bad Gateway Error [Solved] - freeCodeCamp
You can get a 502 bad gateway error when there's a problem with ... So the error is often caused by the server...
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 FreeTop 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
Top GitHub Comments
Thanks @ajbouh and @antony, this has been released in v0.38.0
In the next weeks I will be working on a sapper project that’s hosted on Now, so looking forward to enjoy this fix 😃
Just tested it. It works - and works well with v12 too. I’ll make the required modifications and open a PR.