Skip to content

Getting warning: You are using a plugin with legacy Nuxt 2 format #1545

@safejace

Description

@safejace

Reproduction

n/a

Steps to reproduce the bug

upgrade from nuxt rc4 to rc 5 6 7 or 8 using npx nuxi upgrade

yarn dev to spin up dev server

Expected behavior

no pinia errors

Actual behavior

when i start the dev serve i get this error:

[warn] [nuxt] You are using a plugin with legacy Nuxt 2 format (context, inject) which is likely to be broken. In the future they will be ignored: PiniaNuxtPlugin

and then while the website it running this error pops up on every page load:

[nuxt] [request error] [unhandled] [500] Cannot set properties of undefined (setting 'pinia')
  at PiniaNuxtPlugin (./.nuxt/dist/server/server.mjs:36760:31)  
  at ./.nuxt/dist/server/server.mjs:488:27  
  at fn (./.nuxt/dist/server/server.mjs:517:27)  
  at Object.callAsync (./node_modules/unctx/dist/index.mjs:49:19)  
  at callWithNuxt (./.nuxt/dist/server/server.mjs:519:23)  
  at applyPlugin (./.nuxt/dist/server/server.mjs:463:29)  
  at Module.applyPlugins (./.nuxt/dist/server/server.mjs:473:11)  
  at processTicksAndRejections (node:internal/process/task_queues:96:5)  
  at async createNuxtAppServer (./.nuxt/dist/server/server.mjs:46:7)  
  at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:172:19)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    need reproThis issue couldn't be reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions