blockweave icon indicating copy to clipboard operation
blockweave copied to clipboard

FIXES node retrocompatibility bug Cannot read property subtle of undefined

Open jsvanilla opened this issue 4 years ago • 2 comments

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 👍

jsvanilla avatar Nov 28 '21 21:11 jsvanilla

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

hubsmoke avatar Dec 07 '21 02:12 hubsmoke

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

jsvanilla avatar Dec 31 '21 06:12 jsvanilla