nitrojs / nitrojs/nitro

Nuxt/Img not compatible with the nitro firebase preset

Open
#1,867 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs reproduction nuxt v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Environment

Node 20.5.1 or node 18, same issue.
Nitro 2.7.2, also same issue in previous versions.

Reproduction

Follow official documentation
https://nitro.unjs.io/deploy/providers/firebase

deploy a nuxt 3 app using Nuxt/Img

Describe the bug

Following the official docs for deploying a Nuxt application to firebase is not compatible with Nuxt/Img

https://nitro.unjs.io/deploy/providers/firebase

No images are visible and the console shows 404 error.

Additional context

firebase.json settings

  "functions": [
    {
      "source": ".output/server",
      "runtime": "nodejs20",
      "codebase": "default",
      "ignore": [".git", "firebase-debug.log", "firebase-debug.*.log"]
    }
  ],
  "hosting": [
    {
      "site": "geoquestr",
      "public": ".output/public",
      "cleanUrls": true,
      "rewrites": [{ "source": "**", "function": "server" }]
    }
  ],

It was the same issue with nuxt 3.7 and previous nuxt/img release candidates.

same issue when using node 18 environment.

Logs
GET https://geoquestr.com/_ipx/q_75&blur_5&s_50x25/posts/geoquestr-release.png 404 (Not Found)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the deployment using the Nitro Firebase documentation, the shown firebase.json configuration, and Nuxt/Img, then inspect the generated .output/server and .output/public behavior for the logged /_ipx request. Done means Nuxt/Img images load successfully after Firebase deployment without the reported 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, nuxt, typescript
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.