@pinia/nuxt doesn't work with nuxt bridge
See original GitHub issueReproduction
https://codesandbox.io/s/brave-danilo-n1de5
Steps to reproduce the behavior
Create a project with nuxt-bridge and @pinia/nuxt.
npm run dev
Open in browser.
Expected behavior
No error.
Actual behavior
500
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
N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
pinia/nuxt doesn't work with nuxt bridge · Issue #889 - GitHub
I managed to workaround the Cannot read properties of undefined (reading 'install') issue by adding an alias to the vite config in nuxt.config...
Read more >Nuxt.js - Pinia
Using Pinia with Nuxt.js is easier since Nuxt takes care of a lot of things when it comes to server side ... Pinia...
Read more >Integrating Nuxt Bridge into a Nuxt 2 Project | Cody Bontecou
I followed the Nuxt Bridge documentation. The maintainers of the documentation did a great job of walking me through the process of migrating...
Read more >Recently Active 'nuxtjs3' Questions - Stack Overflow
Hello I'm currently having issues with the integration of pinia in Nuxt3 whenever I run npm run dev it give me a warning....
Read more >nuxt-bridge-pinia-error - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to workaround the
Cannot read properties of undefined (reading 'install')
issue by adding an alias to the vite config innuxt.config
. This gave me a different error:[vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.
Adding the following to
nuxt.config
got rid of both errors for me.with vite is getting the error:
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)