johannschopplich / nuxt-gtag

🔸 Google Analytics & Ads integration made easy
https://developers.google.com/tag-platform/gtagjs
MIT License
302 stars 9 forks source link

Nuxt types are missing after installing the module #34

Closed buditanrim closed 11 months ago

buditanrim commented 11 months ago

Environment

Node.js v18.16.0

Reproduction

  1. pnpm add -D nuxt-gtag
  2. add modules: ['nuxt-gtag'], in nuxt.config.ts
  3. gtag: { id: 'G-XXXXXXXXXX' }

Describe the bug

I get Object literal may only specify known properties, and ‘gtag’ does not exist in type

image

Additional context

No response

Logs

No response

johannschopplich commented 11 months ago

Have you checked to:

After you have added the module Nuxt has to be started once so that the types are being generated.