soybeanjs / soybean-admin

A clean, elegant, beautiful and powerful admin template, based on Vue3, Vite5, TypeScript, Pinia, NaiveUI and UnoCSS. 一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite5, TypeScript, Pinia, NaiveUI 和 UnoCSS。

Home Page:https://soybeanjs.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: NavieUI组件引入失败

zhumingjie1996 opened this issue · comments

软件版本

1.3.4

运行环境

MacOS

运行架构

None

重现步骤

pnpm i
pnpm dev

期望的结果是什么?

页面正常加载组件

实际的结果是什么?

!(https://github.com/user-attachments/assets/5ebacac8-f7b1-4a67-ae94-c7fee3225bc0)

日志记录(可选)

client:495 [vite] connecting...
client:614 [vite] connected.
chunk-ZVFWNQVB.js?v=028318b2:1528 [Vue warn]: Failed to resolve component: NWatermark
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <App>
warn$1 @ chunk-ZVFWNQVB.js?v=028318b2:1528
显示另外 1 个框架
收起
chunk-ZVFWNQVB.js?v=028318b2:1528 [Vue warn]: Failed to resolve component: AppProvider
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <App>
warn$1 @ chunk-ZVFWNQVB.js?v=028318b2:1528
显示另外 1 个框架
...

补充说明(可选)

新手尝试,谢谢指导🙏

大概率是 unplugin-vue-components 自动导入的插件没有生效

这个插件需要读写权限,项目所在的文件夹很关键,最好放到D判断或E盘,不要放C盘、桌面上等

node版本是多少,尝试换新一点的

node版本是多少,尝试换新一点的

目前v19.9.0 ,尝试一下更新版本

大概率是 unplugin-vue-components 自动导入的插件没有生效

我把components.d.ts删除后重新生成后的文件缺失有缺失, 好像没有NavieUI相关组件
export interface GlobalComponents { AppProvider: typeof import('./../components/common/app-provider.vue')['default'] BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default'] ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default'] CountTo: typeof import('./../components/custom/count-to.vue')['default'] DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default'] ExceptionBase: typeof import('./../components/common/exception-base.vue')['default'] FullScreen: typeof import('./../components/common/full-screen.vue')['default'] LangSwitch: typeof import('./../components/common/lang-switch.vue')['default'] LookForward: typeof import('./../components/custom/look-forward.vue')['default'] MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default'] PinToggler: typeof import('./../components/common/pin-toggler.vue')['default'] ReloadButton: typeof import('./../components/common/reload-button.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SoybeanAvatar: typeof import('./../components/custom/soybean-avatar.vue')['default'] SvgIcon: typeof import('./../components/custom/svg-icon.vue')['default'] SystemLogo: typeof import('./../components/common/system-logo.vue')['default'] TableColumnSetting: typeof import('./../components/advanced/table-column-setting.vue')['default'] TableHeaderOperation: typeof import('./../components/advanced/table-header-operation.vue')['default'] ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default'] WaveBg: typeof import('./../components/custom/wave-bg.vue')['default'] } }

unplugin-vue-components 调整为0.26版本后正常运行