Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

FIXES node retrocompatibility bug Cannot read property subtle of undefined #7

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jsvanilla
Copy link

In node 12 to 15, the library doesn´t work because this error. I love the project! And if I see new issues, I try to fix them 👍

…fined

In node 12 to 15, the library doesn´t work because this error. I love the project! And if I see new issues, I try to fix them 👍
@hubsmoke
Copy link

hubsmoke commented Dec 7, 2021

Also having the 'subtle of undefined' issue, but I upgraded to node 16 and blasted my node_modules, npm installed again, and this proposed fix did not seem to solve the error. There seemed to be a new error after updating to node 16.x.x. I think it was a 'package not found' error for webcrypto, unfortunately I did not record the error. Just wanted to flag this problem I experienced

@jsvanilla
Copy link
Author

This version works for me with node v12.18.3
The solution in my case it was ading the folow lines on the src/utils/crypto.ts in line 17

if (!this.driver) { if (typeof webcrypto === 'undefined') { webcrypto = { configurable: false, enumerable: true, get() { return lazyRequire('internal/crypto/webcrypto').crypto; } }; }

Could you please register the error and the test version of node if do you use this my patch solution? That way I can help you find the specific patch for the node version that you use

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants