How to deploy Nextjs App on Google App engine?

692 views Asked by At

i am trying to deploy Nextjs app on Google App Engine but i am getting 500 server error as show below enter image description here


i have deployed the app using the Google App Engine browser terminal..
env: standard
runtime: nodejs12
service: default

handlers:
  - url: /.*
    secure: always
    script: auto

above is the app.yaml code that i have used. i have tried hosting React app with the above mentioned approach and it is hosting perfectly. so, is there any way yo resolve this issue ?

1

There are 1 answers

2
Roopa M On BEST ANSWER

I recreated your issue with the exact error. The problem was with nodejs version compatibility. Try using nodejs16 or above. This would solve your issue.

env: standard
runtime: nodejs16
service: next-app

handlers:
  - url: /.*
    secure: always
    script: auto