kiliman / tailwindui-crawler

tailwindui-crawler downloads the component HTML files locally
MIT License
765 stars 97 forks source link

Syntax error? #73

Closed key88sf closed 1 year ago

key88sf commented 1 year ago
yarn run v1.22.15
$ node index.mjs
file:///Users/xxx/workspace/tailwindui-crawler/index.mjs:79
      port: uri.port ?? 443,
                      ^

SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
    at async link (internal/modules/esm/module_job.js:42:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
key88sf commented 1 year ago

Looks like there is a minimum node version required? I updated to Node 16x and that works now.

kiliman commented 1 year ago

Oops, sorry. It looks like nullish coalescing operator (??) is only supported on Node v14.5+. I need to update package.json to specify the version. Thanks!

https://node.green/#ES2020-features--nullish-coalescing-operator-----