aem-project-archetype icon indicating copy to clipboard operation
aem-project-archetype copied to clipboard

AEM as Cloud Service - Non-production pipeline failing when using Angular

Open GuilhermeRios opened this issue 3 years ago • 4 comments

Expected Behaviour

Being able to execute a non-production pipeline without errors.

Actual Behaviour

A non-production pipeline is failing when trying to run ui.frontend npm test. I attached a full log from the pipeline.

Reproduce Scenario (including but not limited to)

Executing a non-production pipeline for a project using Angular and archetype 29. I was able to reproduce using WSL 2.0 as well, running mvn clean install -PautoInstallSinglePackage.

Steps to Reproduce

Create a new project using angular as a frontend module:

mvn -B archetype:generate "-D archetypeGroupId=com.adobe.aem" "-D archetypeArtifactId=aem-project-archetype" "-D archetypeVersion=29" "-D appTitle=aem_angular" "-D appId=aem-angular" "-D groupId=com.aem.angular" "-D aemVersion=cloud" "-D frontendModule=angular" "-D includeExamples=y" "-D amp=n" "-D enableSSR=n" "-D language=pt" "-D singleCountry=n" "-D includeDispatcherConfig=y" "-D country=br"

Platform and Version

AEM as Cloud Service - latest version. Archetype 29

Logs taken while reproducing problem

build_maven_build.log

Any help is appreciated.

GuilhermeRios avatar Sep 23 '21 19:09 GuilhermeRios

I'm having the same problem but with archetype 35. Any help?

letsouzagomes avatar Apr 10 '22 15:04 letsouzagomes

@letsouzagomes If you run installSinglePackage in a fresh installation of Linux or WSL you'll be able to see which dependencies are missing and then you add them to your pom file.

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/create-application-project/build-environment-details.html?lang=en

GuilhermeRios avatar Apr 10 '22 18:04 GuilhermeRios

@GuilhermeRios Good stuff, thanks for sharing. Just one more question, how do you solve the chrome problem? Since it is not a package that you install directly from apt install on linux without adding the google repository.

letsouzagomes avatar Apr 10 '22 21:04 letsouzagomes

Hi @letsouzagomes Check your Karma.conf.js, it was the only config that I had to change: browsers: ['ChromeHeadlessSandboxless'], // To be able to run tests in Docker customLaunchers: { ChromeHeadlessSandboxless: { base: 'ChromeHeadless', flags: ['--no-sandbox'] } },

GuilhermeRios avatar Apr 14 '22 18:04 GuilhermeRios