Module parse failed: Unexpected token

Hi All,

I have a Vue2 application with Cesium, and I am in the process of updating my current Cesium dependency to the latest version.

What I have found is that I can update the dependency to version 1.97 without issue, but updating to anything past that I am getting the following error

error in ./node_modules/cesium/Source/Scene/Model/MetadataPipelineStage.js

Module parse failed: Unexpected token (86:29)
You may need an appropriate loader to handle this file type.
| const { shaderBuilder, model } = renderResources;
| const { structuralMetadata = {}, content } = model;

const statistics = content?.tileset.metadataExtension?.statistics;

| const propertyAttributesInfo = getPropertyAttributesInfo(

@ ./node_modules/cesium/Source/Cesium.js 913:0-90 913:0-90

and appears it’s the following line that is having raising the issue
const statistics = content?.tileset.metadataExtension?.statistics

sorry I am not super great with javascript dependencies and package loading, if anyone could point me in the right direction please that would be super appreciated


Hi there,

I believe this GitHub thread covers the problem you’re running into.