Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@pinia/nuxt doesn't work with nuxt bridge #917

Closed
psycongaroo opened this issue Dec 22, 2021 · 2 comments
Closed

@pinia/nuxt doesn't work with nuxt bridge #917

psycongaroo opened this issue Dec 22, 2021 · 2 comments

Comments

@psycongaroo
Copy link

Actual behavior

Cannot read properties of undefined (reading 'install') at Function.Vue.use (file://./.nuxt/dist/server/server.mjs:7842:23) at $id_c39524e4 (file://./.nuxt/dist/server/server.mjs:20715:7) at async __instantiateModule__ (file://./.nuxt/dist/server/server.mjs:20913:3)

Additional information

The error popup only using vite and not webpack.
#889

Using the method provided by @BobbieGoede is fixed:

vite: { optimizeDeps: { exclude: ['pinia'], }, resolve: { alias: { pinia: path.resolve(__dirname, './node_modules/pinia/dist/pinia.mjs'), }, }, }

@posva
Copy link
Member

posva commented Dec 22, 2021

Duplicate of #690

@posva posva marked this as a duplicate of #690 Dec 22, 2021
@posva posva closed this as completed Dec 22, 2021
@posva
Copy link
Member

posva commented Dec 22, 2021

For the moment, don't use Vite with Nuxt 2/bridge: https://github.com/piniajs/example-nuxt-bridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants