Expand my Community achievements bar.

SOLVED

I am getting npm run prod error while building a project, can someone help me to solve this?

Avatar

Level 3
 mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=37 -D appTitle="WKND Sites Project" -D appId="wknd" -D groupId="com.adobe.aem.guides" -D artifactId="aem-guides-wknd" -D package="com.adobe.aem.guides.wknd" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.0" -D includeDispatcherConfig=n -D frontendModule="general"
mvn clean install -PautoInstallPackage -Padobe-public
Screenshot 2022-09-26 193811.png

java version - 11.0.11
mvn version - 3.8.6
node.js - v18.9.0
npm - 8.19.2 

1 Accepted Solution

Avatar

Correct answer by
Level 4

From the image still not clear about the error.

If you go up the console and the error is something related to @Deleted Account express, then you need to add the below in your 'package.json' file inside 'ui.frontend' module

 

 "devDependencies"
"typescript": "^3.8.3",

"dependencies": {
"@types/express-serve-static-core": "4.17.24",
}

 

Delete the 'node_modules' folder and then build your project again.

 

https://github.com/DefinitelyTyped/DefinitelyTyped/issues/53397 

View solution in original post

6 Replies

Avatar

Level 5

Could you check the npm and node version configured in your pom.xml and confirm if install version and required versions are the same?

poojac35931336_0-1664194637969.png

 

If not, try to build with with below parameters 

-Dnode.version=v18.9.0 -Dnpm.version=8.19.2

 

 

Avatar

Level 4

Hi @VedhaSri ,

 

Can you provide the detailed error?

Avatar

Correct answer by
Level 4

From the image still not clear about the error.

If you go up the console and the error is something related to @Deleted Account express, then you need to add the below in your 'package.json' file inside 'ui.frontend' module

 

 "devDependencies"
"typescript": "^3.8.3",

"dependencies": {
"@types/express-serve-static-core": "4.17.24",
}

 

Delete the 'node_modules' folder and then build your project again.

 

https://github.com/DefinitelyTyped/DefinitelyTyped/issues/53397