Questions tagged [nuxt-plugin]

8 questions
2
votes
0 answers

Error while injecting javascript class as a plugin in nuxtjs2

I am trying to inject a javascript class as a plugin. I get following error: Cannot read property 'log' of undefined Class to be injected: // helper/logging.service.js export class LoggingService { constructor (prefix) { this.prefix =…
mahatmanich
  • 10,791
  • 5
  • 63
  • 82
2
votes
2 answers

WebStorm 2021.3 shows "Unresolved variable $sdk" when accessing Nuxt.js plugin from component

I'm trying to use Nuxt.js plugins within my project, but WebStorm is not able to correctly recognize what the plugin exposes. In my case, it's an OpenAPI client, and without autocompletion in WebStorm, I am pretty much unable to work with it at all,…
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
1
vote
2 answers

nuxt3 how to call pinia store in composeable

Since the nuxt 3.4.0 update the pinia store can no longer be used in composeables. //example composable import { useAuthStore } from '~/store/auth-store'; const authStore = useAuthStore(); export function doSomethingWithStore() { return…
1
vote
1 answer

How to use Swiper.js(version 8+) in Nuxt(2.15.8)

First I tried this as showed in official Swiper.js website for Vue 3 demo