Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesnt with NuxtImage #1523

Closed
crunchwrap89 opened this issue Apr 25, 2024 · 0 comments
Closed

Doesnt with NuxtImage #1523

crunchwrap89 opened this issue Apr 25, 2024 · 0 comments

Comments

@crunchwrap89
Copy link

crunchwrap89 commented Apr 25, 2024

Reproduction

https://github.com/posva/nuxt--vuefire-example-blaze-plan

Steps to reproduce the bug

When adding a <NuxtImage src='image.png'/> to any vuefire project and then deploying the app as a serverless function, then the NuxtImage doesnt work.

Expected behavior

NuxtImage should display images properly resized etc with IPX as default provider.

Actual behavior

Nuxt image Works locally with npm run dev, but not when deployed as a serverless function to firebase hosting.
( using npm build , npx firebase-tools deploy. )

Instead it does not display any image at all. Error in console is:

Failed to load resource: the server responded with a status of 404 ()

Additional information

nuxt.config.ts nitroconfig:

  nitro: {
    firebase: {
      nodeVersion: '20',
      gen: 2,
      httpsOptions: {
        region: 'europe-west1',
        maxInstances: 2,
      },
    },
    preset: 'firebase',
    esbuild: {
      options: {
        target: 'esnext',
      },
    },
    compressPublicAssets: true,
  },

firebase.json

  {
  "database": {
    "rules": "database.rules.json"
  },
  "functions": [
    {
      "source": ".output/server",
      "runtime": "nodejs20",
      "codebase": "default",
      "ignore": [
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ]
    },
    {
      "source": "functions",
      "codebase": "score-tracker",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ]
    }
  ],
  "hosting": [
    {
      "site": "geoquestr",
      "public": ".output/public",
      "cleanUrls": true,
      "rewrites": [
        {
          "source": "**",
          "function": "server"
        }
      ]
    }
  ],
  "emulators": {
    "ui": {
      "enabled": true,
      "port": 4000
    },
    "auth": {
      "port": 9099
    },
    "database": {
      "port": 9001
    },
    "hosting": {
      "port": 5002

    },
    "singleProjectMode": true
  }
}
@vuejs vuejs locked and limited conversation to collaborators Apr 25, 2024
@posva posva converted this issue into discussion #1524 Apr 25, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant