Pipeline build fails from unpinned Node/NPM and missing package-lock.json in AEM Cloud Manager
In AEM Cloud Manager, pipeline builds fail when Node and NPM versions aren’t set in the frontend-maven-plugin and the package-lock.json file isn’t committed. This leads to syntax errors or incompatibilities after environment or dependency updates. To fix this issue, pin compatible Node/NPM versions and commit the package-lock.json file.
Description description
Environment
Adobe Experience Manager
Issue/Symptoms
- Pipeline fails during Build and Unit testing for all environments (DEV, Stage, PROD).
- Error messages show JavaScript syntax incompatibility in a dependency during
npm run production. - Error messages reference SyntaxError: Unexpected token . in
baseline-browser-mappingdependency. - Builds that previously succeeded now fail without changes to code or dependencies.
Resolution resolution
To fix this issue, follow these steps:
- Update the POM file to specify compatible Node and NPM versions in the
frontend-maven-pluginconfiguration. - Run
npm installlocally to generate a newpackage-lock.jsonfile. - Commit the generated
package-lock.jsonfile to source control. - Push these changes to your repository.
- Re-run the Cloud Manager pipeline.
- Verify the build completes successfully without syntax errors.
Related readings
- Set up development tools in AEM as a Cloud Service Tutorials
- The Build Environment in AEM as a Cloud Service Tutorials
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f