小工具知识网

当前位置: 首页 > 行业知识 > Vue3报错:Failed to resolve component: xx If this is a native custom element, make sure to exclude it f

行业知识

Vue3报错:Failed to resolve component: xx If this is a native custom element, make sure to exclude it f

2026-11-15 09:08:31 来源:互联网转载

Vue3报错:Failed to resolve component: xxx

If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

翻译:无法解析组件:xxx

如果这是本机自定义元素,请确保通过compiler Options.is Custom Element将其从组件解析中排除。

网上找了很多博客,都没有解决问题,最后发现是setup没加上

 

参考:

网上有很多出现此报错的原因是import没写对

比如 import xx from '路径'写成了import {xx} from '路径',原因是混淆了引入组件和引入组件中的方法

上一篇:【微信小程序开发】学习小程序的模块化开发(自定义组件和分包加载)

下一篇:无线串口服务器怎么用?