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

Cannot get started using Nuxt 3 #732

Open
PaulCombal opened this issue Jul 22, 2024 · 2 comments
Open

Cannot get started using Nuxt 3 #732

PaulCombal opened this issue Jul 22, 2024 · 2 comments

Comments

@PaulCombal
Copy link

I've followed the instructions installing the module with Nuxi, and adding <VitePwaManifest /> to app.vue.

Then nothing happens, after some digging, it is because in VitePwaManifest.mjs, the import import { pwaInfo } from "virtual:pwa-info"; fails. (pwaInfo is undefined).

My nuxt.config is empty: pwa: {}

root@568df2510c73:/src# yarn why vite
├─ @nuxt/vite-builder@npm:3.12.3
│  └─ vite@npm:5.3.3 (via npm:^5.3.2)
│
├─ @nuxt/vite-builder@npm:3.12.3 [a9fb2]
│  └─ vite@npm:5.3.3 [2c305] (via npm:^5.0.0 [2c305])
│
└─ vite-node@npm:1.6.0
   └─ vite@npm:5.3.3 [2c305] (via npm:^5.0.0 [2c305])
root@568df2510c73:/src# yarn why @vite-pwa/nuxt
└─ telegram-front@workspace:.
   └─ @vite-pwa/nuxt@npm:0.9.1 [a9fb2] (via npm:latest [a9fb2])
@userquin
Copy link
Member

Try adding also vite-plugin-pwa and workbox-window as dev dependencies. Check scafolding section in the docs: select vue + nuxt in the prompts

@PaulCombal
Copy link
Author

This doesn't seem to make any difference.. Here is my package.json:

  "devDependencies": {
    "@nuxt/devtools": "^1.0.8",
    "@nuxt/image": "latest",
    "@nuxtjs/i18n": "^8.3.0",
    "@sidebase/nuxt-auth": "^0.8.0",
    "@vite-pwa/nuxt": "latest",
    "nuxt": "^3.12.4",
    "vite-plugin-pwa": "^0.20.0",
    "workbox-window": "^7.1.0"
  },
  "dependencies": {
    "@mdi/font": "^6.5.95",
    "@nuxt/vite-builder": "^3.12.2",
    "@pinia/nuxt": "^0.5.1",
    "@vueuse/nuxt": "^10.11.0",
    "apexcharts": "3.36.3",
    "perfect-debounce": "^1.0.0",
    "pinia": "^2.1.7",
    "sass": "^1.49.9",
    "vue": "^3.4.29",
    "vue-tabler-icons": "^2.9.0",
    "vue3-apexcharts": "^1.4.1",
    "vue3-perfect-scrollbar": "^1.6.0",
    "vuetify": "^3.6.9"
  },

I'm not planning to scaffold a new app, but rather to turn an existing one into a fully fledged PWA!

Even then, I ran the scaffolding script, and it yields the same result: pwaInfo is undefined..

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