buffer icon indicating copy to clipboard operation
buffer copied to clipboard

Cannot find name 'BigInt'

Open MayankDargan opened this issue 4 years ago • 1 comments

ERROR in node_modules/buffer/index.d.ts:23:38 - error TS2304: Cannot find name 'BigInt'.

23 readBigUInt64LE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:24:38 - error TS2304: Cannot find name 'BigInt'.

24 readBigUInt64BE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:30:37 - error TS2304: Cannot find name 'BigInt'.

30 readBigInt64LE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:31:37 - error TS2304: Cannot find name 'BigInt'.

31 readBigInt64BE(offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:45:54 - error TS2304: Cannot find name 'BigInt'.

45 writeBigUInt64LE(value: number, offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:46:54 - error TS2304: Cannot find name 'BigInt'.

46 writeBigUInt64BE(value: number, offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:52:53 - error TS2304: Cannot find name 'BigInt'.

52 writeBigInt64LE(value: number, offset: number): BigInt; ~~~~~~ node_modules/buffer/index.d.ts:53:53 - error TS2304: Cannot find name 'BigInt'.

53 writeBigInt64BE(value: number, offset: number): BigInt; ~~~~~~

It is not able to find BigInt and hence throwing the error on project build. "typescript": "^4.0.3"

MayankDargan avatar May 17 '21 10:05 MayankDargan

try setting TypeScript target to ES2020

v1rtl avatar Nov 02 '21 06:11 v1rtl