Front end pipeline build error | Community
Skip to main content
jezwn
Level 5
January 14, 2025
Solved

Front end pipeline build error

  • January 14, 2025
  • 4 replies
  • 758 views

Im getting the below build error executing the FE pipeline:

Executing command git fetch Executing command git checkout develop Switched to a new branch 'develop' Branch 'develop' set up to track remote branch 'develop' from 'origin'. [BUILD] Running git change-log command(s) [BUILD] Running npm audit command(s) Executing command npm --progress false audit --production --audit-level=critical npm ERR! Cannot read property '@adobe/aem-site-theme-builder' of undefined npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-01-14T07_02_33_850Z-debug.log

Im using node version 18 and below in the theme builder dependency I'm using,

"@adobe/aem-site-theme-builder": "5.2.1"

 

Complete package.json below:

{ "name": "test-website-theme", "version": "0.0.1", "description": "Standard AEM site theme stub", "license": "MIT License, Copyright 2020 Adobe Systems Incorporated", "scripts": { "build": "rimraf dist && parcel build src/theme.ts", "watch": "parcel watch src/theme.ts", "proxy": "aem-site-theme-builder live", "live": "npm-run-all -p watch proxy" }, "devDependencies": { "@adobe/aem-site-theme-builder": "5.2.1", "@parcel/transformer-sass": "^2.0.1", "autoprefixer": "^10.3.7", "browser-sync": "^2.26.13", "install": "^0.13.0", "normalize.css": "^8.0.1", "npm": "^11.0.0", "npm-run-all": "^4.1.5", "parcel": "^2.0.1", "parcel-namer-rewrite": "^2.0.0-rc.1", "postcss": "^8.3.11", "rimraf": "^3.0.2", "typescript": "^4.5.2" }, "parcel-namer-rewrite": { "chain": "@parcel/namer-default", "rules": { "(.*?)(\\.[a-f0-9]{8})?\\.(ttf|woff2?)": "resources/fonts/$1.$3", "(.*?)(\\.[a-f0-9]{8})?\\.(svg|png|gif|jpg|jpeg|webp)": "resources/images/$1.$3" } }, "postcss": { "plugins": { "autoprefixer": { "overrideBrowserslist": [ "> 1%", "last 2 versions" ] } } } }

 

 

The local npm install and running the audit in local works fine:

npm --progress false audit --production --audit-level=critical

 

But the cloud pipeline is failing. 
Any thoughts? Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by olsalas711

You need to verify the Node.js version being used by the frontend pipeline. Consider setting the NODE_VERSION pipeline variable to a compatible version.

 

Developing Sites with the Front-End Pipeline | Adobe Experience Manager

4 replies

olsalas711Accepted solution
Level 4
January 14, 2025

You need to verify the Node.js version being used by the frontend pipeline. Consider setting the NODE_VERSION pipeline variable to a compatible version.

 

Developing Sites with the Front-End Pipeline | Adobe Experience Manager

PRATHYUSHA_VP
Community Advisor
Community Advisor
January 15, 2025

Hi @jezwn 

 

It is mostly due to dependency / version issue.

 

Try installing using npm install command in front-end folder

 

For clearing cache you can use below command.

 

 

 

npm cache clean --force

 

 

 

Also check the node_modules if @adobe/aem-site-theme-builder is installed

 

Other optional check you can do if package-lock.json is created (If created delete the file and run the pipeline again). 

 

Hope this helps

 

 

AmitVishwakarma
Community Advisor
Community Advisor
January 17, 2025

Hi @jezwn

To resolve the front-end pipeline build error:

  1. Check Node Version: Ensure the cloud pipeline uses a compatible Node.js version (preferably Node.js 18).

  2. Clear npm Cache:

 

Run npm cache clean --force and then npm install --force to reinstall dependencies.

 

  • Try Older npm Version: Set npm 6 or npm 7 in the pipeline if you're using npm 11.

  • Verify Dependencies: Ensure package-lock.json is present and dependencies are correctly installed.

  • Check npm Logs: Review the full error log for more detailed insights on what’s going wrong.

  • Test Locally: Reproduce the error locally by clearing node_modules and running a fresh install (npm install).

  • Upgrade 

 

 

@adobe/aem-site-theme-builder:

 

 

Try updating to a newer version if possible.

These steps should help fix the issue in the pipeline.

kautuk_sahni
Community Manager
Community Manager
January 27, 2025

@jezwn Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni