Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
91
rated 0 times [  93] [ 2]  / answers: 1 / hits: 5828  / 3 Years ago, mon, july 5, 2021, 12:00:00

QUESTION: How can I resolve the Typescript Compiler (tsc) error "Namespace 'NodeJS' has no exported member 'Global'"?


While running tsc, I'm all of a sudden seeing the following error in a "legacy"(not new) project:


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> {
~~~~~~

I tried adding installing @types/node and adding "types": ["node"] to my tsconfig (as suggested in this SO post), but that didn't help.


Node version: 12.18.4


Jest version: 26.5.3


More From » node.js

 Answers
11

I was able to work around this issue by adding "skipLibCheck": true to my tsconfig.


TFM: https://www.typescriptlang.org/tsconfig#skipLibCheck


[#1136] Tuesday, June 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanskylerg

Total Points: 524
Total Questions: 107
Total Answers: 100

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;