Serve: Minor update adds the 'async' and makes Node v7.6+ a requirement

Created on 10 Apr 2018  Â·  6Comments  Â·  Source: vercel/serve

Minor update v.6.5.4 adds the async on line 83 of serve.js:
detect(port).then(async open => {
which adds the hard dependency on Node v7.6+. Serve is now crashing on Node v6 and below.

Error log:

/usr/local/lib/node_modules/serve/bin/serve.js:83
detect(port).then(async open => {
                  ^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)

Most helpful comment

It's fine to only support LTS. It's just incorrect to start doing that in the minor hotfix version update because people use the ^version numbers in package.json.

All 6 comments

Possibly related to https://github.com/zeit/serve/issues/348.

_Sent from my Pixel 2 XL using FastHub_

Not related to #348
async word is introduced in node v7.6.0

You should update node engines in pacakge.json to warn requirement https://github.com/zeit/serve/blob/master/package.json#L22

This is causing trouble for gatsby users https://github.com/gatsbyjs/gatsby/issues/5184

We're very sorry for unexpectedly breaking serve for users of versions older than Node.js LTS.

However, we're only ever going to support Node.js LTS, nothing below – please upgrade.

It's fine to only support LTS. It's just incorrect to start doing that in the minor hotfix version update because people use the ^version numbers in package.json.

Absolutely. We updated the file and released a new update earlier! Sorry for the inconvenience we‘ve caused.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  7Comments

k7sleeper picture k7sleeper  Â·  7Comments

leo picture leo  Â·  5Comments

donmccurdy picture donmccurdy  Â·  6Comments

nermin99 picture nermin99  Â·  3Comments