Search code examples
nuxt.jsnuxt3.jsnuxt-content

WARN [nuxt] Two component files resolving


WARN [nuxt] Two component files resolving to the same name ProseCode:

  • ./node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseCode.vue
  • ./node_modules/@nuxt/content/dist/runtime/components/Prose/ProseCode.vue

WARN [nuxt] Two component files resolving to the same name ProsePre:

  • ./node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProsePre.vue
  • ./node_modules/@nuxt/content/dist/runtime/components/Prose/ProsePre.vue

warning after updated nuxt 3 -> 3.7 & nuxt/content 2.4 -> 2.8

how can this be fixed? thanks


Solution

  • As stated in https://github.com/nuxt/content/issues/2266#issuecomment-1720124274

    There are no warnings logged with Content v2.8.2 and Nuxt v3.7.2 anymore.

    So just upgrade to:

    • nuxt/content >= 2.8.2 and
    • nuxt >= 3.7.2

    Make sure to run the following command afterwards

    npx nuxi upgrade --force

    It'll delete your lockfile and node_modules folder to make sure you'll get the new versions.