I have a problem publishing an app in Firebase Studio. At some point, the publish stops working and throws an error.
When I try to publish from Firebase Studio, I get the following error. Checking the Firebase build log shows the same issue.
Next.js build worker exited with code: 1 and signal: null
Restoring original next config in project root
/layers/google.nodejs.firebasenextjs/npm_modules/node_modules/@apphosting/common/dist/index.js:61
reject(new Error(`Build process exited with error code ${code}.`));
^
Error: Build process exited with error code 1.
at ChildProcess.<anonymous> (/layers/google.nodejs.firebasenextjs/npm_modules/node_modules/@apphosting/common/dist/index.js:61:24)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)
Node.js v22.21.0
Done "npm exec --prefix /layers/google.nodejs.firebasenextjs/npm_m..." (54.892570857s)
Failed to build (error ID: 297d7f27):
{
"reason":"Failed Framework Build",
"code":"fah/failed-framework-build",
"userFacingMessage":"Your application failed to run the framework build command 'npm exec --prefix /layers/google.nodejs.firebasenextjs/npm_modules apphosting-adapter-nextjs-build' successfully. Please check the raw log to address the error and confirm that your application builds locally before redeploying.",
"rawLog":"(error ID: d0a693a9):
Overriding Next Config to add configs optmized for Firebase App Hosting
Successfully created next.config.ts with Firebase App Hosting overrides
> nextn@0.1.0 build
> NODE_ENV=production next build
▲ Next.js 15.3.3
- Environments: .env
Creating an optimized production build ...
✓ Compiled successfully in 38.0s
Skipping linting
Checking validity of types ...
Failed to compile.
src/app/(app)/properties/[propertyId]/page.tsx
Type error: Type '{ params: { propertyId: string; }; }' does not satisfy the constraint 'PageProps'.
Types of property 'params' are incompatible.
Type '{ propertyId: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]
Next.js build worker exited with code: 1 and signal: null
Restoring original next config in project root
/layers/google.nodejs.firebasenextjs/npm_modules/node_modules/@apphosting/common/dist/index.js:61
reject(new Error(`Build process exited with error code ${code}.`));
^
Error: Build process exited with error code 1.
at ChildProcess.<anonymous> (/layers/google.nodejs.firebasenextjs/npm_modules/node_modules/@apphosting/common/dist/index.js:61:24)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)
Node.js v22.21.0"
}
Final errors during deployment:
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
Finished Step #3 - "pack"
ERROR
ERROR: build step 3 "gcr.io/k8s-skaffold/pack" failed: step exited with non-zero status: 1
