Pinia Nuxt not working #1643
Replies: 4 comments
-
I'm having this problem too on macos, Nuxt 3.0.0-rc.8. To replicate, simply create a new nuxt 3 project with nuxt/pinia listed as a dependency. In the meantime, you can use composables in nuxt 3 to manage shared state: https://v3.nuxtjs.org/guide/features/state-management/ |
Beta Was this translation helpful? Give feedback.
-
Hello, any news ? |
Beta Was this translation helpful? Give feedback.
-
I am getting the same error, seems like the |
Beta Was this translation helpful? Give feedback.
-
First WayAdd import { createResolver } from "@nuxt/kit";
export default defineNuxtConfig({
// ...
modules: ["@pinia/nuxt"],
alias: {
pinia: createResolver(import.meta.url).resolve("node_modules/@pinia/nuxt/node_modules/pinia/dist/pinia.mjs"),
},
// ...
}); In this case, it works without installing Second Waynpm install pinia # or npm install pinia --force Test Environment
Related Issues |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
Not working
Steps to reproduce the bug
After installing @pinia/nuxt and starting the nuxt project it throws error
Cannot start nuxt: Cannot find module 'pinia/dist/pinia.mjs'
Expected behavior
It should work
Actual behavior
It doesn't work
Additional information
Nuxt version is 3.0.0-rc.9 and pinia nuxt version is 0.4.2
Beta Was this translation helpful? Give feedback.
All reactions