-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
detectProxyTarget is not a function #6
Comments
When I downloaded your library directly from the GitHub and import it into my project everything is working fine. So it's probably some issue in the distribution package (I'm using Yarn) |
Could you please post here the result of console.log(detectProxyTarget) |
The library is exported as a CommonJS module but Node.js expects an ECMAScript Module. It is interoperable but requires some magic. Please read this Node.js docs section https://nodejs.org/api/esm.html#interoperability-with-commonjs |
Had the same issue, the easiest solution for me was to switch to Or, at least, it started "working". Returning |
Same issue here. 2 workarounds that are working for me:
|
Unfortunately, this doesn't work for me :-(
|
I figured it out, in the case of typescript it's necessary to do cast:
Thanks for the hint @Zil-B |
Hi,
I'm trying to use your library in nodejs 18.12.0 but I still receiving the following error during runtime:
detectProxyTarget is not a function
I'm including your library in this way:
import detectProxyTarget from "evm-proxy-detection";
and using it this way:
Do you have any idea why the import is not working? Thanks for any advice
The text was updated successfully, but these errors were encountered: