ReferenceError: BigInt is not defined #40
Replies: 13 comments
-
I have CI running with 10.13.0, 10.x, 12.0.0 and 12.x on three runtimes. BigInt has landed in node with 10.4.0 What else can you tell about your environment? |
Beta Was this translation helpful? Give feedback.
-
the same problem in node v8.16.1 |
Beta Was this translation helpful? Give feedback.
-
@zuizuihao node 8 is not a supported runtime. |
Beta Was this translation helpful? Give feedback.
-
alright, I just want to use openid-client which depend on this package. is there any other solution? |
Beta Was this translation helpful? Give feedback.
-
I am using nvm for node versions, can that be an issue? |
Beta Was this translation helpful? Give feedback.
-
It may not be set up right, run |
Beta Was this translation helpful? Give feedback.
-
@zuizuihao use 2.x of openid-client or start thinking of upgrading to node 10 or node 12. Node 8 End-of-live is December 2019 at which point it stops getting any updates. https://github.com/nodejs/Release#release-schedule |
Beta Was this translation helpful? Give feedback.
-
{ OS: Ubuntu 18.04.03 |
Beta Was this translation helpful? Give feedback.
-
Then this just isn't possible and there's an issue with how you run your program, try placing |
Beta Was this translation helpful? Give feedback.
-
One thing I forgot to mention, it gives this error when I use openid-client npm package. |
Beta Was this translation helpful? Give feedback.
-
That doesn't matter, openid-client's CI also runs the full supported runtime matrix, see here |
Beta Was this translation helpful? Give feedback.
-
I understand that and I agree there's something wrong with my env but that's what I am trying to figure out for the last few hours, what is going wrong, I ran the same code on another system with windows 10 OS and it ran as expected. |
Beta Was this translation helpful? Give feedback.
-
I can see two different ways you invoke node in that screenshot, run Its clear now your VS Code is not using your nvm installed node version and you can confirm that by placing |
Beta Was this translation helpful? Give feedback.
-
node_modules/@panva/jose/lib/help/rsa_primes.js:8
const ZERO = BigInt(0)
^
ReferenceError: BigInt is not defined
at Object. (/home/kbihm/Projects/openid-backend/node_modules/@panva/jose/lib/help/rsa_primes.js:8:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/kbihm/Projects/openid-backend/node_modules/@panva/jose/lib/help/key_utils.js:9:23)
at Module._compile (module.js:652:30)
Node versions tested - 10.16.0 & 12.9.1
Beta Was this translation helpful? Give feedback.
All reactions