8000 this.$matomo is not available in the context using TypeScript · Issue #21 · pimlie/nuxt-matomo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
this.$matomo is not available in the context using TypeScript #21
Open
@fbjorn

Description

@fbjorn

Hi,

I installed the plugin this way:

    [
      "nuxt-matomo",
      {
        matomoUrl: "//matomo.my.domain/",
        siteId: 1,
        cookies: false,
      },
    ],

However during yarn generate I get the following error:

ERROR in components/ExportAs.vue:52:10
TS2339: Property '$matomo' does not exist on type 'ExportAs'.
    50 |
    51 |   foo() {
  > 52 |     this.$matomo.trackGoal(1)
       |          ^^^^^^^
    53 |   }
    54 |

As a result, I can't build my website.

FYI, I'm using JetBrains IDE, and they have rich autocomplete for such kind of injections, e.g nuxt-i18n:
image

Unfortunately, there's no for matomo:
image

Do you have any ideas how to resolve it, or at least 492E bypass?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0