Closed telmoenmartins closed 11 months ago
Ah shit, that's annoying. Problem appears on Nuxt@3.7.0+
Could this be related to vite@4.4 🤔
I'll try to look into that.
Okay here's a workaround, add this to nuxt.config.ts
:
export default defineNuxtConfig({
modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt'],
build: {
transpile: ['pinia-plugin-persistedstate'],
},
});
Okay here's a workaround, add this to
nuxt.config.ts
:export default defineNuxtConfig({ modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt'], build: { transpile: ['pinia-plugin-persistedstate'], }, });
This works for me. Thanks, @prazdevs
Could you try again with
"@pinia-plugin-persistedstate/nuxt": "^1.1.1",
"@pinia/nuxt": "^0.4.11",
"nuxt": "^3.7.3"
I have it working locally (it worked with 3.7.0 too tho). Does it work locally ?
Could you try again with
"@pinia-plugin-persistedstate/nuxt": "^1.1.1", "@pinia/nuxt": "^0.4.11", "nuxt": "^3.7.3"
I have it working locally (it worked with 3.7.0 too tho). Does it work locally ?
No luck, only working with the transpile option for now
I'll try to see if i can add transpilation to the module itself and it works, so there's no need to add it afterwards.
Okay here's a workaround, add this to
nuxt.config.ts
:export default defineNuxtConfig({ modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt'], build: { transpile: ['pinia-plugin-persistedstate'], }, });
Works for me. Thank you, @prazdevs :)
Hi, I try the workaround, it's works. but somehow the state is not persist. I check my cookies it's empty. and when I reload the state refreshed.
It's only me or it's also happened to you guys?
Everything seems to be working fine with nuxt@3.8.2
without having to transpile 👍
feel free to reopen is issue somehow reappears
build: { transpile: ['pinia-plugin-persistedstate'], },
Just encountered the issue with following packages, the build transpile option fixes it:
thanks for the headsup, i kinda want to do a new module version and make it cleaner, but i have lots of stuff on the plate, and personal/health issues, so it has to wait.
as long as there is a workaround and it can work, it's ok ^_^
build: { transpile: ['pinia-plugin-persistedstate'], },
It's working ❤️
Okay here's a workaround, add this to
nuxt.config.ts
:export default defineNuxtConfig({ modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt'], build: { transpile: ['pinia-plugin-persistedstate'], }, });
THANKSS. 13/07/2024 still working
Okay here's a workaround, add this to
nuxt.config.ts
:export default defineNuxtConfig({ modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt'], build: { transpile: ['pinia-plugin-persistedstate'], }, });
doesn't work
Have a look into https://github.com/vuejs/pinia/issues/2822. Try to run npm i pinia --force
Describe the bug
With a simple setup of pinia and pinia persisted state on nuxt3 this error appears, any ideal why?
Reproduction
https://stackblitz.com/edit/nuxt-starter-crtmzw?file=nuxt.config.ts
System Info
Used Package Manager
npm
Validations