I am getting npm run prod error while building a project, can someone help me to solve this? | Community
Skip to main content
Level 3
September 26, 2022
Solved

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

  • September 26, 2022
  • 2 replies
  • 4827 views
 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

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SwetaB

From the image still not clear about the error.

If you go up the console and the error is something related to @767515 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 

2 replies

Level 4
September 26, 2022

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

 

If not, try to build with with below parameters 

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

 

 

VedhaSriAuthor
Level 3
September 26, 2022

Tried, not working.

Level 4
September 26, 2022

Hi @vedhasri ,

 

Can you provide the detailed error?

VedhaSriAuthor
Level 3
September 26, 2022

Hi sweta, I have updated the query please check now.

VedhaSriAuthor
Level 3
September 27, 2022

From the image still not clear about the error.

If you go up the console and the error is something related to @767515 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 


Working, thanks.