SAP Knowledge Base Article - Preview

3442471 - Error: "SyntaxError: Unexpected token '??='" when deploying CAP NodeJS project to BTP

Symptom

When deploying a CAP NodeJS project to BTP, you are getting the following error:

SyntaxError: Unexpected token '??='

You might also see:

ERROR the "before-all"" build failed: could not execute the "npx -p @sap/cds-dk cds build --production" command: exit status 1

Error: could not build the MTA project ... command: exit status 2