While using command mvn clean install -PautoInstallPackage i am getting this error.
Solved! Go to Solution.
Views
Replies
Total Likes
@monish_gavali
Check this thread https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/failing-to-deploy-ui-front... . This thread has most of the recommendations and check list.
Don't just focus on the npm run prod error. You must have received one more error above and try fixing that. In my case i was having issue with src\main\webpack\components\atoms\xxxxxx-steps\xxxx-steps.scss and fixing that worked for me.
Here are some steps you could try:
1. Ensure that Node.js and npm are properly installed. You can check their versions by running node -v and npm -v in the terminal.
2. Check the JavaScript code in your project. The error log should provide more details about the specific file and line of code causing the issue. Sometimes, the problem can be as simple as a missing semicolon or an undefined variable.
3. Make sure that the Node.js and npm versions defined in the pom.xml file match the versions installed on your system.
4. Try running npm install and npm run prod directly from the terminal inside the portfolio-site.ui.frontend directory. This can sometimes provide more detailed error messages.
5. Check if there is a .npmrc file in the project and ensure that it doesn't contain any settings that might conflict with your environment.
6. Try deleting the node_modules folder and the package-lock.json file in the portfolio-site.ui.frontend directory, then run npm install again.
Remember, it's crucial to understand the error message returned by the npm command. The message Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2), indicates that the npm script prod is failing. Investigating the prod script in the package.json file or running the script directly in the terminal might provide more insight.
Additionally try focusing on the error you received just above this error in the log.
Please check the below link
Also couple of things to check the archetype you are using
the node version you have in you local . Both of these could cause this to fail.
Thanks,
Sherin
@monish_gavali
Check this thread https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/failing-to-deploy-ui-front... . This thread has most of the recommendations and check list.
Don't just focus on the npm run prod error. You must have received one more error above and try fixing that. In my case i was having issue with src\main\webpack\components\atoms\xxxxxx-steps\xxxx-steps.scss and fixing that worked for me.
Here are some steps you could try:
1. Ensure that Node.js and npm are properly installed. You can check their versions by running node -v and npm -v in the terminal.
2. Check the JavaScript code in your project. The error log should provide more details about the specific file and line of code causing the issue. Sometimes, the problem can be as simple as a missing semicolon or an undefined variable.
3. Make sure that the Node.js and npm versions defined in the pom.xml file match the versions installed on your system.
4. Try running npm install and npm run prod directly from the terminal inside the portfolio-site.ui.frontend directory. This can sometimes provide more detailed error messages.
5. Check if there is a .npmrc file in the project and ensure that it doesn't contain any settings that might conflict with your environment.
6. Try deleting the node_modules folder and the package-lock.json file in the portfolio-site.ui.frontend directory, then run npm install again.
Remember, it's crucial to understand the error message returned by the npm command. The message Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2), indicates that the npm script prod is failing. Investigating the prod script in the package.json file or running the script directly in the terminal might provide more insight.
Additionally try focusing on the error you received just above this error in the log.
Views
Likes
Replies