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.

Nodejs 14 compatibility on stable

See original GitHub issue

Hej there,

first of all thanks for your great project!

I wanted leave a note that I just spent several hours trying to debug why my instance wouldn’t start up in an updated container. The dirty db backend worked fine, but using the postgres backend startup would simply hang forever. As it turned out, the problem was that I was using nodejs 14 and apparently something changed about promises (didn’t dive deeper into it, sorry) and the following code would be skipped:

server.js

...
  db.init()
    .then(plugins.update)
    .then(function() { <============== this apparently does not work on node 14 for whatever reasons
      console.info("Installed plugins: " + plugins.formatPluginsWithVersion());
      console.debug("Installed parts:\n" + plugins.formatParts());
      console.debug("Installed hooks:\n" + plugins.formatHooks());

      // Call loadSettings hook
      hooks.aCallAll("loadSettings", { settings: settings });

      // initalize the http server
      hooks.callAll("createServer", {});
    })
    .catch(function(e) {
      console.error("exception thrown: " + e.message);
      if (e.stack) {
        console.log(e.stack);
      }
      process.exit(1);
    });
});

So going back to nodejs 10 solved the issue.

I just wanted to let you know - maybe you can add something to the stable branch (is it fixed on master? Didn’t check) that at least warns users. Or document it somewhere.

Best regards

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
muxatorcommented, May 15, 2020

I am thinking to add a code path to do an early check on maximum supported Node version on startup. We already do this for minimum node version, but cases like this (the runtime ecosystem progressing and the codebase not always keeping up) will happen again.

@rmader lost a lot of time because of this.

Edit: just to clarify: @rmader discovered this unexpected incompatibility. I want an easy toggle to explicitly gate the maximum version, so that it is extremely clear that something has to be done.

1reaction
JohnMcLearcommented, May 14, 2020
  1. It seems fine w/ dirtyref on ueberdb and that’s what I hope to get merged in (waiting on @muxator)
  2. The issue should be opened on ueberdb repo 😃

Thanks op! @muxator my assumption is that pg just needs bumping in package.json in ueber if you want a small fix.

I don’t wanna spend time on this any further though because I already put the effort in to mitigate this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node v14.0.0 (Current)
As of Node.js 14 there is no longer this warning when using ESM in Node.js. However, the ESM implementation in Node.js remains experimental....
Read more >
Node.js version 14 available now
Diagnostic Report goes Stable. The diagnostic report will be released as a stable feature in Node.js 14 (it was added as an experimental...
Read more >
Installation of Nodejs 14 on Windows 7 · Issue #3878 - GitHub
But Nodejs 14 isn't supported for Windows 7. ... but also to encourage people to upgrade if possible to get better support and...
Read more >
Node.js v14: What's New?
Let's dive into the updates that Node.js version 14 gives us! ... "Diagnostic Reporting is now stable in Node.js v14!" ...
Read more >
Node.js 14.x runtime now available in AWS Lambda
You can migrate existing Node.js 12 functions to the new runtime by making any necessary changes to code for compatibility with Node.js 14,...
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