I tried linking my nextjs website (https://github.com/synodicai/synodic, the /website folder) to App Hosting on Firebase, but I am getting the following error:
2024-05-15 14:49:43.978 EDT
Finished Step #2
2024-05-15 14:49:43.978 EDT
ERROR
2024-05-15 14:49:43.978 EDT
ERROR: build step 2 "gcr.io/k8s-skaffold/pack" failed: step exited with non-zero status: 1
I have the same problem. I was just following the steps at the Firebase Doc's get started section (https://firebase.google.com/docs/app-hosting/get-started) and made the boilerplate app with `npm init @apphosting`, pushed it to a git repo, then followed the web console prompts to setup the github integration and name a backend, and it magically started deploying. Then it failed on Step #2 with the same messages you got. Scrolling up in the logs, I see that it did not find a nextjs config but I'm not sure if that's the source of the problem.
I wonder if it's because the project is in typescript? Is it not compiling it to js first?
As a "hacky" temporal solution meanwhile, I made it work by:
1. Duplicate package.json in the repo's root directory
2. Update the scripts on the new root's package.json from:
"build": "next build"
to:
"build": "cd <nested directory> && npm run build"