Skip to content

Problem with Pinia and latest build of Nuxt3 #730

@lukaszflorczak

Description

@lukaszflorczak

Today I updated Nuxt 3 to the latest release and Pinia stopped working. Here is the repository with a totally clear installation of Nuxt 3 (on main branch) and Pinia (on test/pinia):

https://github.com/lukaszflorczak/nuxt3-demo/tree/test/pinia

To reproduce the problem, just run the project. You should see:

Zrzut ekranu 2021-10-19 o 08 13 43

Accessing app is not supported in Nuxt3.
Cannot read properties of undefined (reading 'use')
  at PiniaNuxtPlugin (file://./.nuxt/dist/server/server.mjs:2053:17)  
  at file://./.nuxt/dist/server/server.mjs:201:27  
  at file://./.nuxt/dist/server/server.mjs:187:38  
  at callWithNuxt (file://./.nuxt/dist/server/server.mjs:227:13)  
  at applyPlugin (file://./.nuxt/dist/server/server.mjs:187:10)  
  at Module.applyPlugins (file://./.nuxt/dist/server/server.mjs:192:11)  
  at async createNuxtAppServer (file://./.nuxt/dist/server/server.mjs:34:5)  
  at async renderToString (file://./node_modules/vue-bundle-renderer/dist/index.mjs:248:19)  
  at async renderMiddleware (file://./.nuxt/nitro/index.mjs:163:20)  
  at async handle (file://./node_modules/h3/dist/index.mjs:572:19)

Yesterday I tested Pinia on version 3.0.0-27242646.117b3aa and it has worked yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions