We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
yarn generate
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:
nuxt-i18n
Unfortunately, there's no for matomo:
Do you have any ideas how to resolve it, or at least bypass?
The text was updated successfully, but these errors were encountered:
I have the same issue. Did you find a solution for this?
Sorry, something went wrong.
I found a fix : you have to declare $matomo yourself :
Create a file in ~/types/index.d.ts :
~/types/index.d.ts
import Vue from 'vue' declare module 'vue/types/vue' { interface Vue { $matomo: any | undefined } }
Then add it in your tsconfig.json :
tsconfig.json
{ ... "types": [..., "types"] ... }
Also keep in mind that matomo is disabled in dev mode. You can enable it by setting the debug option in your nuxt.config.js :
nuxt.config.js
[ 'nuxt-matomo', { matomoUrl: '//eeee.matomo.cloud/', siteId: 1, debug: true }, ],
No branches or pull requests
Hi,
I installed the plugin this way:
However during
yarn generate
I get the following error: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
:Unfortunately, there's no for matomo:
Do you have any ideas how to resolve it, or at least bypass?
The text was updated successfully, but these errors were encountered: