Module parse failed: Unexpected token
??
#561
-
Hi all, I followed you tutorial to install Flowbite https://flowbite.com/docs/getting-started/react/. By importing any Component into my React App e.g.
Could you please help me to resolve such issue? Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
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
.