在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

相关推荐
驯狼小羊羔2 分钟前
学习随笔-require和import
前端·学习
excel9 分钟前
🚀 从 GPT-5 流式输出看现代前端的流式请求机制(Koa 实现版)
前端
凸头13 分钟前
Spring Boot接收前端参数的注解总结
前端·spring boot·后端
爱吃甜品的糯米团子33 分钟前
JavaScript 正则表达式:选择、分组与引用深度解析
前端·javascript·正则表达式
excel37 分钟前
Vue SSR 编译器源码深析:ssrTransformShow 的实现原理与设计哲学
前端
excel38 分钟前
深入解析 Vue 3 SSR 编译管线:ssrCodegenTransform 源码全解
前端
excel39 分钟前
深入解析 Vue SSR 编译器的核心函数:compile
前端
IT_陈寒40 分钟前
Vue 3性能优化实战:7个关键技巧让我的应用加载速度提升50%
前端·人工智能·后端
excel42 分钟前
Vue SSR 错误系统源码解析:createSSRCompilerError 与 SSRErrorCodes 的设计原理
前端
excel43 分钟前
Vue SSR 源码解析:ssrTransformModel 深度剖析
前端