Skip to content

Module parse failed: Unexpected token ?? #561

Locked Answered by tulup-conner
lanluu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there, this is an old post, but to answer your question, you are having this issue because the version of ECMAScript you are "transpiling" to in your environment is too old to support ??.

It's referred to as the nullish coalescing operator.

You'll need to use a newer "language version" of JavaScript to fix this issue, like ES2015.

If you're using TypeScript, you can achieve this with tsconfig.json.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tulup-conner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants