google-cloud-platformgoogle-app-enginegoogle-appengine-node

How to deploy Nextjs App on Google App engine?


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 ?


Solution

  • 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