小编Fel*_*usa的帖子

TypeScript + Jest + Ts-Jest 错误:运行构建脚本时出错

执行脚本构建时,提示返回依赖项错误:

> tsc -p tsconfig.json && rollup -c rollup.config.js

node_modules/@types/jest/index.d.ts:484:51 - error TS2307: Cannot find module 'jest-diff'.

484             diff(a: any, b: any, options?: import("jest-diff").DiffOptions): string | null;
                                                      ~~~~~~~~~~~

node_modules/@types/jest/index.d.ts:538:44 - error TS2307: Cannot find module 'pretty-format'.

538     type SnapshotSerializerPlugin = import('pretty-format').Plugin;
                                               ~~~~~~~~~~~~~~~

Run Code Online (Sandbox Code Playgroud)

有关版本、错误等的更多详细信息 https://github.com/felipesousa/wunderlist-api/tree/develop

typescript jestjs ts-jest

6
推荐指数
0
解决办法
1040
查看次数

标签 统计

jestjs ×1

ts-jest ×1

typescript ×1