Build App hook broken for nuxt app

Hi! :wave:

It seems like every time I deploy one of my nuxt projects it breaks. When I open the website it responds with a 502 Bad Gateway error. I can fix it by going to View App Status > Actions > Reload App.

From the PM logs it seems like the following command is executed: " start nuxt start", which fails. Then when a reload is triggered, it executes " start nuxt start".

Can you please help me fix this? :slight_smile:

Hey @Barry!

Maybe giving PM2 a full restart will clear things up. To do that, go to server > services > NodeJS, click on the ellipsis on the NodeJS row and then click Repair.

Try a test deploy after that and let me know if that cleared things up or not.

Thanks for the quick reply Adam! Just tried out your suggestion and unfortunately it didn’t work. Errors in the PM log seem the same as before.

Ah, ok. I was hoping the tried and true power cycle would fix the issue. :slight_smile:

Are you deploying the site via the button, push-to-deploy, or GitHub Actions?

It was worth a try :slightly_smiling_face:
We deploy by manually pushing the button.

I shall look into it more deeply and see if I can see what might be causing it.

I’ve tried seeing if I can repro the issue but wasn’t able to. It could be something with the app - but difficult for me to say… If it’s on GitHub you can add my username (armgitaar) to the project and I can test it on my server to see if I can reproduce the issue.

Hi Adam, can only think of one other thing at this moment: could it be related to the type of site we have used? If I remember correctly (I cannot see it now) we created this as a Nuxt SSR site. It is still a Nuxt site, but we have disabled the SSR-feature. Could that cause the issue, and if so, how could we fix it?

Thanks for your help so far!

As in is it Nuxt Static now?

You might try adding a new test site for NodeJS SSR / Static and then deploy it a couple times to see if the same issue occurs.