standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.27k stars 147 forks source link

TypeError: Illegal invocation with wrapped native function getting Proxy as receiver #853

Closed Flarna closed 5 years ago

Flarna commented 5 years ago

With esm 3.2.25 I get TypeError: Illegal invocation if I wrap e.g. crypto.randomBytes and then call it as it gets the Proxy as receiver which is not supported in the v8 version used by Node <10.

I use NodeJs version 8.16.2; the problem does not happen with 10.17.0 or 12.13.0.

It seems that this is already solved by https://github.com/standard-things/esm/commit/c910d5716624eb5c6126b3679e268cac6282fcab but there is no release which includes this.

Is it planned to release a new version of esm where above commit is included?

jdalton commented 5 years ago

Thanks for digging into this @Flarna. I'll try to release this weekend.