unplugin-auto-import icon indicating copy to clipboard operation
unplugin-auto-import copied to clipboard

找不到模块“unplugin-auto-import/vite”或其相应的类型声明。

Open 1LJJ1 opened this issue 1 month ago • 1 comments

Describe the bug

v20.3.0。开发Electron项目。在官网下载的electron模版。然后下载unplugin/unplugin-auto-import 导入到electron.vite.config.ts中报错。不影响代码执行。我降级到20.0.0时,报错消失。 TypeScript:^5.3.3 Vite:^5.0.12

Reproduction

找不到模块“unplugin-auto-import/vite”或其相应的类型声明。 “/Users/longjunjie/project/electron-xiaoluxian/node_modules/unplugin-auto-import/dist/vite.d.mts”处有类型,但无法在当前 "moduleResolution" 设置下解析此结果。请考虑更新到 "node16"、"nodenext" 或 "bundler"。

System Info

Mac,芯片m3pro

Used Package Manager

npm

Validations

  • [x] Follow our Code of Conduct
  • [x] Read the Contributing Guide.
  • [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [x] The provided reproduction is a minimal reproducible of the bug.

1LJJ1 avatar Dec 06 '25 08:12 1LJJ1

+1

tanranran avatar Dec 10 '25 10:12 tanranran

+1

roblues avatar Dec 23 '25 01:12 roblues