Expand my Community achievements bar.

SOLVED

error coming while running aem up command

Avatar

Level 1

SamarGill_0-1723451170155.png

when i am running  the aem up command it showing the spanwn UNKNOWN error due to which localhost:3000 is not opening up. 

what could be the reasons behind this error. can anyone tell me how to resolve it.

 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi @SamarGill,

cc - @kautuk_sahni 

This happens when CMD tries to open the localhost automatically in the browser.
I found a workaround for this issue. You can use the —-no-open flag to bypass the automatic functionality and manually open the localhost in the browser of your choice.
Use this command - aem up --no-open
Then the simulator keeps running.

I know that I am late for this, but I faced this error only yesterday. After trying all the things possible, I accidentally came across this flag when I fired the command wrongly, and the suggestions came up. 

I hope this helps someone someday.

Thanks and regards,
Darpan Aneja

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @SamarGill 
The spawn UNKNOWN error might occur if the version of Node.js or NPM is outdated or corrupted. Please try to update the NPM and Node js

 

If the issue persists, consider reinstalling or updating the AEM environment you're working with.

  • Delete the existing AEM project’s node_modules folder
  • Clear the npm cache: npm cache clean --force
  • Reinstall the project dependencies: npm install

 



Arun Patidar

Avatar

Administrator

@SamarGill Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Correct answer by
Employee

Hi @SamarGill,

cc - @kautuk_sahni 

This happens when CMD tries to open the localhost automatically in the browser.
I found a workaround for this issue. You can use the —-no-open flag to bypass the automatic functionality and manually open the localhost in the browser of your choice.
Use this command - aem up --no-open
Then the simulator keeps running.

I know that I am late for this, but I faced this error only yesterday. After trying all the things possible, I accidentally came across this flag when I fired the command wrongly, and the suggestions came up. 

I hope this helps someone someday.

Thanks and regards,
Darpan Aneja