panva / paseto

PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
MIT License
428 stars 26 forks source link

Node 14 bug - TypeError: Cannot read property 'subtle' of undefined (line 10 of crypto_worker.js) #24

Closed P-Jay357 closed 2 years ago

P-Jay357 commented 2 years ago

What happened?

If the Node version is 14 (have not tested below 14), I get this error when importing V2 Paseto.

If I upgrade to Node 16 then this issue seems fixed, but some of my other packages don't support Node 16 yet, so this isn't ideal.

Version

v3.0.1

Node.js Version

v14.17.6

Code to reproduce

const { V2 } = require('paseto');

panva commented 2 years ago

https://github.com/panva/paseto#supported-library-versions

https://github.com/panva/paseto/blob/v3.0.1/package.json#L47-L49