在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

相关推荐
niucloud-admin4 小时前
web 端前端
前端
摘星编程7 小时前
React Native for OpenHarmony 实战:Linking 链接处理详解
javascript·react native·react.js
胖者是谁7 小时前
EasyPlayerPro的使用方法
前端·javascript·css
EndingCoder7 小时前
索引类型和 keyof 操作符
linux·运维·前端·javascript·ubuntu·typescript
liux35288 小时前
Web集群管理实战指南:从架构到运维
运维·前端·架构
沛沛老爹8 小时前
Web转AI架构篇 Agent Skills vs MCP:工具箱与标准接口的本质区别
java·开发语言·前端·人工智能·架构·企业开发
摘星编程8 小时前
React Native for OpenHarmony 实战:ImageBackground 背景图片详解
javascript·react native·react.js
小光学长8 小时前
基于Web的长江游轮公共服务系统j225o57w(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
前端·数据库
摘星编程9 小时前
React Native for OpenHarmony 实战:Alert 警告提示详解
javascript·react native·react.js
Joe5569 小时前
vue2 + antDesign 下拉框限制只能选择2个
服务器·前端·javascript