Tuesday, 6 June 2023

AEM Project Creation Issues

 AEM Project Creation issues


AEM Project archetype and AEM version combinations

Source : https://github.com/adobe/aem-project-archetype/blob/develop/VERSIONS.md 


Archetype VersionAEM Version
76.0 or newer
86.0 or newer
96.0 or newer
106.0 or newer
116.2 or newer
126.3 or newer
146.4, 6.3 + SP2
156.4, 6.3 + SP2
166.4, 6.3 + SP2
136.4, 6.3 + SP2
176.4, 6.3 + SP2
186.5, 6.4, 6.3 + SP3
196.5, 6.4, 6.3 + SP3
20, 21, 226.5, 6.4, 6.3 + SP3
236.5, 6.4, 6.3 + SP3, AEM as a Cloud Service
24, 25, 26, 276.5.5, 6.4.8.1, AEM as a Cloud Service
28, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41
6.5.7, AEM as a Cloud Service


React SPA 

mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=35 -D appTitle="Agro Tourism" -D appId="agrotourism" -D groupId="com.agro.tourism.aem" -D artifactId="agrotourism-aem-project" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.5" -D includeDispatcherConfig=n -D includeExamples=n  -D frontendmodule=react


error 1

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project agrotourism-aem-project.ui.frontend: Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]


Solution 1 : To fix this, set the version of POM.xml NODE and NPM version to that of local node and npm versions.


Solution 2 : make changes in package.json file in ui.frontend

update "typescript":"3.3.3333 to "typescript":" 4.8.2"

remove package-lock.json


error 2
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: startup failed:
[ERROR] General error during conversion: Conflicting module versions. Module [groovy-all is loaded in version 2.4.16 and you are trying to load version 2.4.8

Solution 1 : update the groovy version to 2.4.8 of the pom.xml
.m2/repository/org/apache/maven/archetype/archetype-common/3.2.1/archetype-common-3.2.1.pom:      <version>2.4.16</version>



Note : If targeting AEM 6.5.5+ replace aemVersion="cloud" with aemVersion="6.5.5". If targeting 6.4.8+, use aemVersion="6.4.8".

No comments:

Post a Comment

Dispatcher configurations in AEM - 2

 Dispatcher configuration 1. The Dispatcher configuration is stored in the dispatcher.any text file. 2. The file contains a series of single...