We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript error in D:/xiaobo/work/Github/react-admin/node_modules/jest-diff/build/diffLines.d.ts(8,13): '=' expected. TS1005
6 | */ 7 | import { Diff } from './cleanupSemantic';
8 | import type { DiffOptions } from './types'; | ^ 9 | export declare const diffLinesUnified: (aLines: string[], bLines: string[], options?: DiffOptions | undefined) => string; 10 | export declare const diffLinesUnified2: (aLinesDisplay: string[], bLinesDisplay: string[], aLinesCompare: string[], bLinesCompare: string[], options?: DiffOptions | undefined) => string; 11 | export declare const diffLinesRaw: (aLines: string[], bLines: string[]) => Diff[];
The text was updated successfully, but these errors were encountered:
没复现出问题,你是升级了依赖包吗?
问题在jest issues里面可以找到及解决方案,可以参考一下:jestjs/jest#9703
Sorry, something went wrong.
我什么都没有改,你可以试着从仓库重新clone一个下来试试,看看能不能复现
1.jest使用的是24.9.0版本,但是查看node_modules/jest-diff/package.json文件,发现使用的是26.0.1版本
2.在package.json中写的是"echarts-for-react": "^2.0.15-beta.1",注意有个^符号,导致了npm i的时候会去获取新版本,查看node_modules/echarts-for-react/package.json文件,发现是"echarts-for-react@2.0.16",即下载了2.0.16版本的echarts-for-react,导致了和你代码中使用的api不一致。
"echarts-for-react": "^2.0.15-beta.1",
^
"echarts-for-react@2.0.16"
解决办法: 1.在package.json中添加"jest-diff": "24.9.0"指定使用24.9.0的jest-diff 2.在package.json中更新为`"echarts-for-react": "2.0.15-beta.1"指定使用2.0.15-beta.1版本的echarts-for-react
"jest-diff": "24.9.0"
No branches or pull requests
TypeScript error in D:/xiaobo/work/Github/react-admin/node_modules/jest-diff/build/diffLines.d.ts(8,13):
'=' expected. TS1005
The text was updated successfully, but these errors were encountered: