nuxt / image

Plug-and-play image optimization for Nuxt applications.
https://image.nuxt.com
MIT License
1.32k stars 269 forks source link

Error in fetch(): nuxtState.data is undefined #65

Closed adhamfarrag closed 3 years ago

adhamfarrag commented 3 years ago

I'm trying to use @nuxt/image with local files inside /static dir, first tried to use local setup

 image: {
    providers: {
      local: {
        dir: '~/static',
        clearCache: false,
      },
    },
  },

then this error showed up, didn't find examples in docs, but using a quick GitHub search I found that in some nuxt docs websites there wasn't image: {} in some cases, same error didn't change when I removed the local configuration.

Thes are my packages :

  "dependencies": {
    "@bazzite/nuxt-optimized-images": "^0.4.0",
    "@nuxt/content": "^1.10.0",
    "@nuxtjs/pwa": "^3.2.2",
    "@tailwindcss/typography": "^0.2.0",
    "core-js": "^3.6.5",
    "nuxt": "^2.14.7",
    "nuxt-i18n": "^6.15.4",
    "nuxt-lazyimage": "^2.0.1",
    "plyr": "^3.6.2",
    "vue-observe-visibility": "^0.4.6",
    "vue-plyr": "^6.0.4",
    "vue-scrollactive": "^0.9.3",
    "vue-tippy": "^4.7.2"
  },
  "devDependencies": {
    "@nuxt/image": "^0.0.3",
    "@nuxtjs/html-validator": "^0.1.1",
    "@nuxtjs/tailwindcss": "^3.2.0",
    "add": "^2.0.6",
    "eslint-config-prettier": "^6.15.0",
    "eslint-plugin-prettier": "^3.1.4",
    "imagemin-mozjpeg": "^9.0.0",
    "lqip-loader": "^2.2.1",
    "prettier": "^2.1.2",
    "responsive-loader": "^2.2.0",
    "webp-loader": "^0.6.0",
    "yarn": "^1.22.10"
  }

Thanks.

farnabaz commented 3 years ago

Hey, This should fix in v0.0.4