question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using "nodejs10.x" as runtime in config causes 502 BAD_GATEWAY error

See original GitHub issue

In 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thghcommented, Jan 7, 2020

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 😃

1reaction
antonycommented, Jan 6, 2020

Just tested it. It works - and works well with v12 too. I’ll make the required modifications and open a PR.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found