hectorm / otpauth

One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers.
https://hectorm.github.io/otpauth/
MIT License
969 stars 56 forks source link

How to solve this ? #304

Closed mohdlatif closed 1 year ago

mohdlatif commented 1 year ago
file:///root/totpauth/node_modules/otpauth/dist/otpauth.node.mjs:77
  if (crypto?.createHmac) {
             ^

SyntaxError: Unexpected token '.'

image

hectorm commented 1 year ago

It seems that the environment in which you are running the code does not support the optional chaining operator.

If you are using a version of Node.js lower than 16, you should upgrade to one of the supported versions.