Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error? #73

Closed
key88sf opened this issue Oct 19, 2022 · 2 comments
Closed

Syntax error? #73

key88sf opened this issue Oct 19, 2022 · 2 comments

Comments

@key88sf
Copy link

key88sf commented Oct 19, 2022

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
Copy link
Author

key88sf commented Oct 19, 2022

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

@kiliman
Copy link
Owner

kiliman commented Oct 19, 2022

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-----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants