pinia-orm icon indicating copy to clipboard operation
pinia-orm copied to clipboard

piniaOrm() Expected 1 arguments, but got 0

Open SBZ-git opened this issue 1 year ago • 0 comments

Environment

Nuxt project info: 5:12:55 PM


  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, modules, piniaOrm
  • Runtime Modules: @pinia/[email protected], @pinia-orm/[email protected]
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-ptph58?file=orm.ts See line 11 (you might have to wait 1-2 minutes until project is installed and indexed on stackblitz)

Describe the bug

If one copies your code from https://pinia-orm.codedredd.de/plugins/axios/guide/setup typescript will report Expected 1 arguments, but got 0 for piniaOrm().use.

PiniaPlugin expects a context but it is not clear where to get this context from.

I believe the issue originated in this commit: https://github.com/CodeDredd/pinia-orm/commit/fda0f99f165ac73ca338cb349a2612eb42273eb7#diff-f384333fe1870b086401a85c6a971359a62254e85ef6dba3046aed7501a71b5eR37

Additional context

No response

Logs

No response

SBZ-git avatar May 23 '24 15:05 SBZ-git