Skip to content

firebase deploy crashes due to next.js image optimization check, version 12.4.5 #6163

@vladimir-voinea

Description

@vladimir-voinea

[REQUIRED] Environment info

firebase-tools: 12.4.5

The issue seems to have been introduced with commit 7d2a90e

Platform: ubuntu-lastest (FirebaseExtended/action-hosting-deploy@v0)

[REQUIRED] Test case

Proprietary source code using "next/image" (image optimization with Node.js), hosted on firebase using Firebase Hosting and Firebase Functions. The code is built using GitHub Actions and deployed using FirebaseExtended/action-hosting-deploy@v0, which uses the latest firebase-tools version. The GitHub Actions job config is below.

Screenshot 2023-07-20 005700

[REQUIRED] Steps to reproduce

  1. Run the FirebaseExtended/action-hosting-deploy@v0 GitHub action, which pulls the latest firebase-tools version, in this case 12.4.5
  2. action-hosting-deploy runs firebase deploy
  3. firebase deploy crashes in isUsingNextImageInAppDirectory

[REQUIRED] Expected behavior

firebase deploy should run successfully and identify Next.js image optimization occurences.

Note: even with the previous version (12.4.4), firebase-tools does not identify the usage of the image optimization in my private repository and I have to create an empty server action for the image optimization to work, otherwise it does not identify the image optimization usage and does not generate a firebase function. If I create an empty server action, then a function is generated and image optimization works as a result of the function being generated for a different purpose

[REQUIRED] Actual behavior

firebase deploy crashes with the stack trace shown below

Screenshot 2023-07-20 005207

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions