image icon indicating copy to clipboard operation
image copied to clipboard

File(s) not found on linux build (target: static)

Open fleshgordo opened this issue 4 years ago • 1 comments

Setup

nuxt: 2.15.8 @nuxt/image: 0.6.0 target static

nuxt.config.js

buildModules: ['@nuxt/image'],
 image: {
      domains: ['http://127.0.0.1:8000'],
    },

including images like below <nuxt-img v-if="article.image" :src="article.image" />

Problem Builds fine on osX (with npm run generate) but when building on linux debian I am getting file not found errors on images that were included via nuxt-image (same node versions on both systems):

ERROR Unexpected response IPX: File not found: /home/user/vue-nuxt/static/imagefolder/screenshot.png

On darwin the build outputs:

✔ Generated static image dist/_nuxt/imagefolder/screenshot.png @nuxt/image 15:09:29

fleshgordo avatar Jan 04 '22 14:01 fleshgordo

Some things to take into consideration for this to work

  • remove ssr from nuxt config
  • move images to static folder

doing this made images to work in dev and generate mode

unrevised6419 avatar Mar 03 '22 14:03 unrevised6419