cancel
Showing results for 
Search instead for 
Did you mean: 

Coalescing operator throws error in build

former_member825173
Discoverer
0 Kudos

I am trying to build my application ; but am getting the following error while building :

ERR! lbt:resources:ResourcePool failed to parse or analyze %s: com/bh/BH_OFS/controller/inventoryLookup/inventoryLookup.controller.js Error: Line 150: Unexpected token ?

inventoryLookup.controller.js:

this.navTo("inventoryDetail", { "?query": { "plant": oModelData.selectedPlant ?? "" , // line 150 "warehouse": oModelData.selectedWarehouse ?? "", "sloc": oModelData.selectedSLOC ?? "", "material": oModelData.materialNum ?? "", "batch": oModelData.selectedBatch ?? "", "SplStk": oModelData.selectedSplStk ?? "", "bin": oModelData.storageBin ?? "", } });Has anyone else faced this issue with coalescing operator ??The application works fine in local without any error.

boghyon
Product and Topic Expert
Product and Topic Expert

Is the project using UI5 Tooling? If so, what is the version of "@ui5/cli" in the "devDependencies" section of package.json?

former_member825173
Discoverer
0 Kudos

The project uses the following tooling version @ui5/cli": "2.2.6",

former_member825173
Discoverer
0 Kudos

Thanks Everyone, am able to build now

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

rishabh_kashyap14

As Matthias posted the solution as an answer below, could you please accept the answer and close this question?

View Entire Topic

Kindly upgrade to the latest CLI and try again:

npm install --save-dev  @ui5/cli@latest