Nuxt-3 build crashes when using pinia #1619
-
Builds generated from Nuxt currently crashes (nuxt instance unavailable), whereas Nuxt can be run via dev without problems - anyways, the problem seems to be related to Pinia: [nuxt] [request error] [unhandled] [500] Cannot find module '/Volumes/nuxt/.output/server/node_modules/pinia/dist/pinia' imported from /Volumes/nuxt/.output/server/chunks/page.mjs
at new NodeError (internal/errors.js:322:7)
at finalizeResolution (internal/modules/esm/resolve.js:318:11)
at moduleResolve (internal/modules/esm/resolve.js:776:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
at link (internal/modules/esm/module_job.js:75:36) After removing pinia entirely Nuxt works just fine - I don't know where the problem exactly is located - setup seems fine to me: // Package.json "dependencies": {
"@pinia/nuxt": "^0.4.1",
"pinia": "^2.0.21"
} // nuxt.config.ts modules: ['@pinia/nuxt'], // store import { defineStore } from 'pinia';
export const useNavigationStore = defineStore('navigationStore', {
state: (): {
seoRoutes: object,
routeReferences: routeReferenceType,
} => ({
seoRoutes: {},
routeReferences: {},
}),
getters: {
getSeoRoutes: state => state.seoRoutes,
getRouteReferences: state => state.routeReferences,
},
actions: {
setSeoRoutes (seoRoutes: object) {
this.seoRoutes = seoRoutes;
},
setRouteReferences (routeReferences: routeReferenceType) {
this.routeReferences = routeReferences;
},
},
}); |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Would you try adding |
Beta Was this translation helpful? Give feedback.
-
Same here |
Beta Was this translation helpful? Give feedback.
-
The Feature seems not to be implemented - which is why it isn't working: |
Beta Was this translation helpful? Give feedback.
The Feature seems not to be implemented - which is why it isn't working:
https://github.com/nuxt/framework/issues/7910