Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 543
ofcosxx Avatar asked Sep 11 '26 16:09

ofcosxx


2 Answers

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.

like image 147
patbird Avatar answered Sep 20 '26 04:09

patbird


This issue is tracked in the nuxt github at https://github.com/nuxt/content/issues/2266

I'm seeing it too so am watching for updates!

edit: Looks like its fixed at [email protected] and upward, I'm no longer seeing it in my build

like image 22
Sam Carrington Avatar answered Sep 20 '26 04:09

Sam Carrington