Skip to content
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

v1.8 breaks prerender #1591

Open
nandi95 opened this issue Nov 10, 2024 · 3 comments
Open

v1.8 breaks prerender #1591

nandi95 opened this issue Nov 10, 2024 · 3 comments
Labels
bug Something isn't working needs reproduction

Comments

@nandi95
Copy link
Contributor

nandi95 commented Nov 10, 2024

After going from 1.7.0 to 1.8.0 the prerender now fails.
Error: [nuxt] [request error] [unhandled] [500] [nuxt] instance unavailable
here are the relevant logs

  at useNuxtApp (./.nuxt/prerender/chunks/build/server.mjs:258:13)  
  at useRequestEvent (./.nuxt/prerender/chunks/build/server.mjs:796:36)  
  at prerenderStaticImages (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:22:16)  
  at getImage2 (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:137:7)  
  at Object.$img (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:142:12)  
  at getVariantSrc (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:308:14)  
  at getSizes (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:249:16)  
  at $img.getSizes (./.nuxt/prerender/chunks/build/_base-CAUaGNyQ.mjs:153:39)  
  at ./.nuxt/prerender/chunks/build/NuxtPicture-BHuUH0dC.mjs:45:45

And the relevant code snippet:

<NuxtLink v-for="category in categories"
          v-once
          :key="category.type"
          :to="{ name: 'products', query: { type: category.type } }"
          class="group relative">
    <NuxtPicture :src="category.image"
                 loading="lazy"
                 height="500"
                 preload
                 :alt="`${category.title} category`"
                 width="1000"
                 :img-attrs="{ class: 'rounded-lg' }" />
@ConnorMcF
Copy link

ConnorMcF commented Nov 22, 2024

I've also just run into this when I added preload onto NuxtPicture.

@Baroshem
Copy link
Collaborator

Hey @nandi95

Thanks for reporting this issue. Would you be able to create a reproduction repository/link with this issue? I can take a look at it :)

@Baroshem Baroshem added bug Something isn't working needs reproduction labels Nov 27, 2024
Copy link
Contributor

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a template for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/image/tree/main/example

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction
Projects
None yet
Development

No branches or pull requests

3 participants