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 · 1 comment
Open

v1.8 breaks prerender #1591

nandi95 opened this issue Nov 10, 2024 · 1 comment

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants