2

After npm install, when I try to 'ng build' the following error occurs:

ERROR in node_modules/@types/node/globals.d.ts(713,19): error TS2304: Cannot find name 'bigint'.
node_modules/@types/node/ts3.6/base.d.ts(13,21): error TS2727: Cannot find lib definition for 'esnext.bigint'. Did you mean 'esnext.intl'?
node_modules/@types/node/util.d.ts(119,56): error TS2304: Cannot find name 'BigInt64Array'.
node_modules/@types/node/util.d.ts(120,57): error TS2304: Cannot find name 'BigUint64Array'.
Balraj Allam
  • 611
  • 6
  • 24
Dhairya Bhavsar
  • 319
  • 4
  • 13

1 Answers1

5

try installing typescript version as - npm install typescript@">=3.1.1 <3.3"

  • This did not solve my issue. I'm using "typescript" 3.9.3 and even put it in "resolutions" to test as well. Still getting the same error. – Yinzara Sep 21 '20 at 17:50
  • try changing the typescript version to 3.2.4 it did work for me. – Manu Sharma Sep 23 '20 at 16:48
  • confirmed version 3.2.4 removes the bigint issue – Ian Preglo Oct 20 '20 at 13:45
  • I wish I could up-vote this more than once! I have been working on this issue for two days now. The build works locally, but when I try and build in a docker image it fails with this error. I changed the version as mentioned by @IanPreglo and it worked immediately. TypeScript 3.2.4 is definitely the fix! Thank you! – mrClean Dec 09 '20 at 14:58