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

zhyuzh3d

关注

阅读 8

2024-06-18


                                                            ~~~~~

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

精彩评论(0)

0 0 举报