WARN [nuxt] Two component files resolving to the same name ProseCode:
警告[nuxt]两个解析为相同名称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:
警告[nuxt]两个解析为相同名称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
更新nuxt 3后的警告->3.7&nuxt/内容2.4->2.8
how can this be fixed?
thanks
如何才能解决这个问题?谢谢
更多回答
优秀答案推荐
As stated in https://github.com/nuxt/content/issues/2266#issuecomment-1720124274
如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.
它将删除您的锁定文件和NODE_MODULES文件夹,以确保您将获得新版本。
This issue is tracked in the nuxt github at https://github.com/nuxt/content/issues/2266
此问题在https://github.com/nuxt/content/issues/2266的nuxt GitHub中进行了跟踪
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
编辑:看起来它固定在[email protected]和向上,我不再看到它在我的建设
you shouldn't use two same component names with the same address, warning here that you've done it twice.
您不应该使用具有相同地址的两个相同的组件名称,在此警告您已经这样做了两次。
That is likely related to this issue: https://github.com/nuxt/content/issues/2266 Nuxt typecheck is broken with nuxt/[email protected] )
这可能与此问题有关:https://github.com/nuxt/content/issues/2266 Nuxt类型检查使用nuxt/[电子邮件受保护]中断)
更多回答
我是一名优秀的程序员,十分优秀!