Minimum Node version?

I'm updating our site to the latest version of Twill 2—2.13.0. I have all the composer packages and their dependencies updated and installed and I ran
php artisan twill:update
successfully. But I'm running into a bug when I run
php artisan twill:build
:

 ERROR  Error loading /home/vagrant/website/vendor/area17/twill/vue.config.js:
 ERROR  SyntaxError: Unexpected token ?
/home/vagrant/website/vendor/area17/twill/vue.config.js:169


The culprit is this line here that uses the nullish coalescing operator (??):

const host = process.env.APP_URL.split('//')[1] ?? process.env.APP_URL;


I'm running node v8.17.0 and npm v6.13.4, as the Twill documentation states that npm 6.13 is the recommended version: https://node.green/#ES2020-features--nullish-coalescing-operator-----. But according to node.green the nullish coalescing operator was introduced in node v14: https://node.green/#ES2020-features--nullish-coalescing-operator-----

So a few questions:

  • Is the minimum version of
    npm
    for Twill2 different from what's stated in the docs?
  • Is there a minimum version of
    node
    that Twill2 requires?
  • Barring all that, could I submit a PR to refactor vue.config.js to not use the ?? operator?
Thanks!
Was this page helpful?