Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Build Failure in ui.frontend

Avatar

Level 2

danishhussain_0-1676445177594.png

while executing the command mvn clean install the following ui.forntend error is occuring

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 

Update the "typescript": "^3.3.333" to "typescript": "^4.9.5",

Sady_Rifat_1-1676451835978.png

Then try to re-run it

 

View solution in original post

8 Replies

Avatar

Community Advisor

As it says, when your maven automation is running "aem run prod", you are getting some sort of error. if you scroll to the top, you can see more details. 

I'm just going to assume your problem. It might be because your have syntax errors, or frontend JS errors. But when you type in mvn clean install, by standards, the maven module will call the frontend-maven-module, which will download the npm and node version (based on configs), and then it will try to build your website. 

I am guessing that you made a change and your code is breaking the build. you can validate the default build by removing all your changes, checking out to "develop", and just run "mvn clean install". if this works, then unfortunately its your syntax in the code..... either way, read the logs. scroll upper and see what the problem is.

Avatar

Level 2

NO, I haven't made any changes in the code. It is a new generated project.

Avatar

Community Advisor

Hello @danish-hussain ,

Generally, this problem happened for npm build failure.

Go to your ui.frontend module. Type the following commands.

 

npm i
npm run prod

 

 You might see, the npm run command failed because of typescript validation. To resolve this just update the typescript version (latest version) from the package.json file. After that again run the following commands and this should be working.
Then you can proceed with mvn clean install command.

Avatar

Correct answer by
Community Advisor

 

Update the "typescript": "^3.3.333" to "typescript": "^4.9.5",

Sady_Rifat_1-1676451835978.png

Then try to re-run it