在vite+vue3+ts时pnpm build打包失败

复制代码
                                                            ~~~~~

node_modules/.pnpm/element-plus@2.7.5_vue@3.4.27_typescript@5.4.5_/node_modules/element-plus/es/utils/objects.d.ts:1:30 - error TS2307: Cannot find module 'type-fest' or its corresponding type declarations.

1 import type { Entries } from 'type-fest';
                               ~~~~~~~~~~~

node_modules/.pnpm/pinia@2.1.7_typescript@5.4.5_vue@3.4.27_typescript@5.4.5_/node_modules/pinia/dist/pinia.d.ts:354:26 -
 error TS2536: Type 'key' cannot be used to index type 'Store<string, S, G, {}>'.

354     [key in Keys]: () => Store<string, S, G, {}>[key];
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 47 errors in 19 files.

Errors  Files
     5  node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.27_typescript@5.4.5_/node_modules/@v

解决办法:

增加:"skipLibCheck":true

相关推荐
juejin_cn1 分钟前
[转][译] 从零开始构建 OpenClaw — 第五部分(对话压缩)
javascript
leolee1820 分钟前
Redux Toolkit 实战使用指南
前端·react.js·redux
bluceli22 分钟前
React Hooks最佳实践:写出优雅高效的组件代码
前端·react.js
IT_陈寒31 分钟前
JavaScript代码效率提升50%?这5个优化技巧你必须知道!
前端·人工智能·后端
IT_陈寒33 分钟前
Java开发必知的5个性能优化黑科技,提升50%效率不是梦!
前端·人工智能·后端
LDX前端校草1 小时前
前端开发规则配置
前端
代码老中医1 小时前
2026前端工程化新范式:如何用AI驱动你的设计系统?
前端
用户11481867894841 小时前
Vite项目中的SVG雪碧图
前端·面试
这个实现不了1 小时前
vue写一些进度条样式1
前端
小蜜蜂dry1 小时前
可视化大屏适配方案之- px-To-viewport
前端