Expand my Community achievements bar.

SOLVED

AEM SPA project maven build failing - Failed to run task: npm test

Avatar

Level 5

Hi All,

I am trying to create AEM SPA with React following this tutorial https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/s.... The project created using maven archetype 39, unable to build, fails during "npm run test" execution with message Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run test) on project aem-guides-wknd-spa.react.ui.frontend: Failed to run task: 'npm test. Also below is the type error

TypeError: Cannot read property 'match' of undefined
[INFO] at interpolate (C:\spa\aem-guides-wknd-spa.react\ui.frontend\node_modules\dotenv-expand\lib\main.js:8:28)
[INFO] at dotenvExpand (C:\spa\aem-guides-wknd-spa.react\ui.frontend\node_modules\dotenv-expand\lib\main.js:36:32)
[INFO] at dotenvFiles.forEach.dotenvFile (C:\spa\aem-guides-wknd-spa.react\ui.frontend\node_modules\react-scripts\config\env.js:43:29) 

Can anyone help me on how to resolve this issue?

I just updated node and npm versions in /ui.frontend/pom.xml as install node and npm execution was failing.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @iamnjain ,

Node version is 18.13.0 and NPM version is 8.19.3. I believe this issue has something to do with proxy as I faced this issue in office network behind a proxy but worked fine in my personal laptop.

We can ignore this issue as this occurred only behind a proxy.

Thanks for the support.

View solution in original post

3 Replies

Avatar

Administrator

@iamnjain @somen-sarkar @bajancherry @sunil_kumar_ 

Requesting your expertise on this AEM question. Appreciate your support in advance.



Kautuk Sahni

Avatar

Community Advisor

Hi @srikanthpogula 

 

can you please share your NPM and Node version?

Which you updated and old one, which came with project repo. 

 

And, Can you please provide more error logs if possible?

Avatar

Correct answer by
Level 5

Hi @iamnjain ,

Node version is 18.13.0 and NPM version is 8.19.3. I believe this issue has something to do with proxy as I faced this issue in office network behind a proxy but worked fine in my personal laptop.

We can ignore this issue as this occurred only behind a proxy.

Thanks for the support.