Closed HendrikJan closed 2 years ago
I'd assume that this is a bug in nuxt(bridge), as this import code generated by nuxt points to an invalid import path:
const __vite_ssr_import_2__ = await __vite_ssr_import__("/@id/pinia/dist/pinia.mjs/dist/pinia.mjs");
See the double /dist/pinia.mjs/dist/pinia.mjs
?
As you state that this only happens when you enable vite in nuxt-bridge, the original import in the package is fine, it's the vite mode that seems to break this particular import.
Could end up being a bug in vite in the end, but should be checked out in nuxt-bridge first.
Created an issue in nuxt/framework
Duplicate of https://github.com/vuejs/pinia/issues/690
Reproduction
https://codesandbox.io/s/bridge-with-pinia-omd9y?file=/nuxt.config.js
Steps to reproduce the behavior
Expected behavior
A working application
Actual behavior
The server builds without an error, but when loading the page in the browser, the 500 error shows
Additional information
The application in the codesandbox works without
vite:true
. The error shows up when I addvite:true
.I'll copy some lines of code from my local environment where the error originates:
Function.Vue.use (file://./.nuxt/dist/server/server.mjs:7855:23)
$id_b275682f (file://./.nuxt/dist/server/server.mjs:48398:7)
file dist.plugin.c9118ab8.mjs