nuxt
nuxt copied to clipboard
Cannot find module '#pwa' or its corresponding type declarations.
I'm following the basic instructions to setup @vite-pwa/nuxt
pnpm add @vite-pwa/nuxt -D
// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
modules: [
'@vite-pwa/nuxt'
],
pwa: {
/* PWA options */
}
})
And got this error.
I also have tryed this and got the same error.
rm -Rf node_modules
rm -Rf dist
rm -Rf .nuxt
pnpm store prune
pnpm add @vite-pwa/nuxt -D --force
@brugomes did you happen to fix this? Also seeing this error...
Error when adding the pwa module? Provide a minimal reproduction, all my tests can install the pwa module: check https://vite-pwa-org.netlify.app/guide/scaffolding.html , follow the prompts selecting Vue when asking for Framework then Nuxt.
Maybe you can try adding .npmrc
file with shamefully-hoist=true
(iirc only pnpm).
@snolan-ethika @brugomes