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.

Github code search reports that there is no use of async or await in koa itself. Therefore, it should work fine in Node 6 (and anecdotally it seems to). Therefore I am struggling to understand the engine restriction on >=7.6 (sorry if I’ve missed something obvious). Obviously middleware authors can require Node > 7.6 if they are going to have async and await directly in npm-published code, but it would be great if Koa itself could relax this restriction for the core if it is unnecessary. My own reasoning is that I’ll be damned if I put non-LTS versions of Node into production.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
jonathanongcommented, Mar 8, 2017

you could just ignore the engine restriction. it would be a bigger issue if someone tried to use koa@2 with async/await on node v6 not knowing that it’s not available on that version of node.

we could drop it, but we’re not going to bother adding babel as a dev dependency just to support v6.

3reactions
bttmlycommented, Mar 9, 2017

Further, it seems weird to insist users use async/await – Koa works perfectly fine with Promises and indeed, even without async/await I find the Koa middleware model far superior to Express/Connect.

As for the worry of someone running koa@2 in an environment that doesn’t support async/await, it doesn’t seem like it should be the library’s responsibility for ensuring developers know the features of then own platform. I think disclaimer in the docs about Node versions that support async/await and a note that Promises can be used instead should be sufficient.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js 6 is approaching End-of-Life – upgrade your AWS ...
Software incompatibility – Newer versions of Node.js better support current best practices and newer design patterns.
Read more >
Node.js - endoflife.date
Release Released Active Support Se... 19 2 months and 1 week ago. (18 Oct 2022) Ends in 3 months. (01 Apr 2023) En... 18 (...
Read more >
Node v6.0.0 (Current)
js v6 branch will become the new Active Long Term Support stream in October of this year, and will continue to be supported...
Read more >
Azure Functions support for Node 6 is ending on 28 February ...
Functions App support for Node 6 apps is ending on 28 February 2022, we recommend you upgrade to Node 14.
Read more >
Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error function() function() function() function() function() function() function() function() function() function() function() function() function() function()...
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