最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Failed to execute 'put' on 'Cache' : workbox and nuxt - Stack Overflow

programmeradmin10浏览0评论

I'm on Nuxtjs 2.15.7 and recently getting this error in my console

as I searched, only got to @nuxt/pwa issue . But I don't have pwa module in my project!!

here is my package.json

{
  "name": "my-app",
  "version": "2.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "dev:host": "nuxt --hostname 0.0.0.0 --port 8000",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/auth": "^4.9.1",
    "@nuxtjs/axios": "^5.13.1",
    "@nuxtjs/device": "^2.1.0",
    "@nuxtjs/google-gtag": "^1.0.4",
    "@nuxtjs/gtm": "^2.4.0",
    "cookie-universal-nuxt": "^2.1.4",
    "core-js": "^3.15.1",
    "nuxt": "^2.15.7",
    "swiper": "^5.4.5",
    "v-viewer": "^1.5.1",
    "vee-validate": "^3.3.7",
    "vue-awesome-swiper": "^4.1.1",
    "vue-cropperjs": "^4.1.0",
    "vue-easy-dnd": "^1.12.2",
    "vue-persian-datetime-picker": "^2.2.0",
    "vue-product-zoomer": "^3.0.1",
    "vue-sweetalert2": "^4.2.1",
    "vue2-editor": "^2.10.2",
    "vuedraggable": "^2.24.0"
  },
  "devDependencies": {
    "@fortawesome/fontawesome-free": "^5.15.1",
    "@mdi/font": "^5.9.55",
    "@nuxtjs/dotenv": "^1.4.1",
    "@nuxtjs/vuetify": "1.12.1",
    "flipclock": "^0.10.8",
    "font-awesome": "^4.7.0",
    "glob": "^7.1.7",
    "noty": "^3.2.0-beta",
    "nuxt-gsap-module": "^1.2.1",
    "sass": "1.32.13"
  }
}

can anybody help?

UPDATE

I only get the error in dev mode

I cleared Cache Storage and re run nuxt and still got error and a cache for workbox has been created again:

I'm on Nuxtjs 2.15.7 and recently getting this error in my console

as I searched, only got to @nuxt/pwa issue . But I don't have pwa module in my project!!

here is my package.json

{
  "name": "my-app",
  "version": "2.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "dev:host": "nuxt --hostname 0.0.0.0 --port 8000",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/auth": "^4.9.1",
    "@nuxtjs/axios": "^5.13.1",
    "@nuxtjs/device": "^2.1.0",
    "@nuxtjs/google-gtag": "^1.0.4",
    "@nuxtjs/gtm": "^2.4.0",
    "cookie-universal-nuxt": "^2.1.4",
    "core-js": "^3.15.1",
    "nuxt": "^2.15.7",
    "swiper": "^5.4.5",
    "v-viewer": "^1.5.1",
    "vee-validate": "^3.3.7",
    "vue-awesome-swiper": "^4.1.1",
    "vue-cropperjs": "^4.1.0",
    "vue-easy-dnd": "^1.12.2",
    "vue-persian-datetime-picker": "^2.2.0",
    "vue-product-zoomer": "^3.0.1",
    "vue-sweetalert2": "^4.2.1",
    "vue2-editor": "^2.10.2",
    "vuedraggable": "^2.24.0"
  },
  "devDependencies": {
    "@fortawesome/fontawesome-free": "^5.15.1",
    "@mdi/font": "^5.9.55",
    "@nuxtjs/dotenv": "^1.4.1",
    "@nuxtjs/vuetify": "1.12.1",
    "flipclock": "^0.10.8",
    "font-awesome": "^4.7.0",
    "glob": "^7.1.7",
    "noty": "^3.2.0-beta",
    "nuxt-gsap-module": "^1.2.1",
    "sass": "1.32.13"
  }
}

can anybody help?

UPDATE

I only get the error in dev mode

I cleared Cache Storage and re run nuxt and still got error and a cache for workbox has been created again:

Share Improve this question edited Oct 11, 2022 at 10:55 kissu 47k16 gold badges90 silver badges189 bronze badges asked Sep 12, 2021 at 6:59 Mojtaba BarariMojtaba Barari 1,2945 gold badges24 silver badges60 bronze badges 3
  • 1 This one is maybe ing from another project that you once ran locally? – kissu Commented Sep 12, 2021 at 10:31
  • @kissu actually I have another clone of this project that has been customized and that project has pwa installed!! is that possible!!? – Mojtaba Barari Commented Sep 12, 2021 at 10:36
  • @kissu there was two workbox in my browser cache storage, so deleted them and ran nuxt again and it created another workbox (updated question with its image) . so if it's because of another projects pwa, how can i clear that!!? – Mojtaba Barari Commented Sep 12, 2021 at 10:45
Add a ment  | 

1 Answer 1

Reset to default 8

Unregister the SW in your devtools.

Since it's tied to a domain name, it should probably be this one. The button is pretty much on your first screenshot (the devtools one).

发布评论

评论列表(0)

  1. 暂无评论