Module parse failed: Unexpected token

Hy everyone!
Can you help me? Why am I getting these errors?

“You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.”

looks like a webpack thing.

webpack versions below 5 don’t handle optional chaining, if you can use webpack 5 maybe upgrade

if you must use version 4, try using babel @babel/plugin-proposal-optional-chaining

ref: javascript - How to make webpack accept optional chaining without babel - Stack Overflow

1 Like

Exactly what @Heaust-ops mentioned !!! thanks a lot

1 Like