johannschopplich / nuxt-gtag

🔸 Google Analytics & Ads integration made easy

Home Page:https://developers.google.com/tag-platform/gtagjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nuxt types are missing after installing the module

buditanrim opened this issue · comments

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

Have you checked to:

  • generate the latest Nuxt types with npx nuxi prepare
  • Restarted the VSCode extensions?

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