NuxtN
Nuxt11mo ago
6 replies
humblemodulo

Nuxt 4 with Content Module v3 `nuxt.config.tx` issue

Using VS Code/Codium there is a nuxt.config IDE error when adding a content:{} section to the config. The error is as follows:
Object literal may only specify known properties, and 'content' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'.ts(2353)

I'm currently using:
future: {
  compatibilityVersion: 4
},

compatibilityDate: '2024-12-24',

modules: [
    '@nuxt/content',
    '@nuxtjs/tailwindcss',
    '@formkit/nuxt',
    '@nuxtjs/mdc',
    '@nuxt/image',
    '@nuxtjs/color-mode',
    '@nuxt/icon',
  ],


My tsconfig.json looks like:

{
  "extends": "./.nuxt/tsconfig.json",
  "compilerOptions": {
    "strict": true,
    "types": [
      "@types/node",
      "@nuxt/image",
      "@trpc/client",
      "@trpc/server",
    ],
  },
  "include": [
    "types/**/*.ts"
  ],
}


There are no conflicts in my package.json. At this point I'm really not sure what to look for. Any insights?


FYI, I'm happy to simply remove the section, but interestingly enough, code highlighting only works if I configure the content section (and simply ignore the errors). If there's a better way to accommodate it, I'm open.
Was this page helpful?