der*_*783 7 javascript node.js tsc jestjs
问题:如何解决 Typescript 编译器 ( tsc
) 错误“命名空间 'NodeJS' 没有导出成员 'Global' ”?
在运行时tsc
,我突然在“遗留”(不是新)项目中看到以下错误:
node_modules/expect/node_modules/@jest/types/build/Global.d.ts:85:62 - error TS2694: Namespace 'NodeJS' has no exported member 'Global'.
85 export interface Global extends GlobalAdditions, Omit<NodeJS.Global, keyof GlobalAdditions> {
~~~~~~
Run Code Online (Sandbox Code Playgroud)
我尝试添加安装@types/node
并添加"types": ["node"]
到我的tsconfig
(如this SO post中所建议的),但这没有帮助。
节点版本:12.18.4
Jest 版本:26.5.3
这是一个已知的错误:https ://github.com/facebook/jest/issues/11640
降级到@types/node
v15.14.0 似乎可以解决我的错误。
归档时间: |
|
查看次数: |
8072 次 |
最近记录: |