aem-project-archetype
aem-project-archetype copied to clipboard
AEM as Cloud Service - Non-production pipeline failing when using Angular
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
Any help is appreciated.
I'm having the same problem but with archetype 35. Any help?
@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 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.
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'] } },