image icon indicating copy to clipboard operation
image copied to clipboard

404 error page image not rehydrating properly

Open shadow81627 opened this issue 4 years ago • 4 comments

On local dev (npm run dev) my 404 page is returning this error: localhost_3000_test

 ERROR  [Vue warn]: Error in render: "TypeError: Cannot read property '_img' of undefined"                                  14:55:22

found in

---> <404> at components/error/404.vue
       <Error> at layouts/error.vue
         <Nuxt>
           <VMain>
             <VApp>
               <Layouts/default.vue> at layouts/default.vue
                 <Root>

In a static generated production environment on vercel the image is pointing to the original static file.

Vercel preview Code

Similar issue to #234

shadow81627 avatar May 01 '21 05:05 shadow81627

Hi @shadow81627. Would you please try 0.4.9 if it fixes your issue?

pi0 avatar May 13 '21 09:05 pi0

The update has fixed the 404 page in my preview but when I run npm run generate npm run start I get an error.

TypeError: input must be a string (received undefined: undefined)

localhost_3000_404

My lighthouse CI check is failing on the 404 page with

total-byte-weight failure for minScore assertion
       Avoid enormous network payloads

shadow81627 avatar May 19 '21 00:05 shadow81627

I'm getting the same error using @nuxt/image 0.4.12, nuxt 2.15.6. I've tried different configurations (target static and server - with and without ssr). The result is always the same. Loading pages which includes the nuxt-img tag results in the following two errors:

[Vue warn]: Missing required prop: "src" [Vue warn]: Error in render: "TypeError: input must be a string (received undefined: undefined)"

Any ideas why this is happening? img tags are working.

tho-masn avatar May 29 '21 08:05 tho-masn

I face the same issue despite not have nuxt-lazy-loader installed at all. I use vuetify and whenever I reload the page, the image appears and the error disappears. However, clicking the link to the image page from another webpage will return the error

genitutors avatar Nov 13 '21 04:11 genitutors