-
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
node-fetch 3.x broken in jest #20
Comments
There's nothing for the lib to correct, the peer dep on Lines 73 to 75 in aaf2874
Use whichever version you'd like. It's up to you. |
I think I faced the same issue trying to use this library with node 16, which was working fine until I tried to update the dependencies I have in my project. Before starting, this is what I have:
Besides that, I was using nodejs 16 since I started the project, but just now I realize I needed to update its dependencies, in doing so through I think this error is possibly related to this issue that @yunnysunny reported as I started to dive in a bit and found that the issue is in the node-fetch import: This issue seems to be related to the node version and also to version 3.3+ from node-fetch. I think this issue is related. The way I fixed the issue temporarily was to install the lib node-fetch 3.0.0 in my project as mentioned by @rschristian, but it has some security issues reported. I think that the question going forward here is if it is possible to support newer versions of node-fetch here. |
node-fetch use esm with 3.x, which not support with jest now, see the issue here node-fetch/node-fetch#1503 .
So, can we roll back the node-fetch to 2.6 to resolve the problem?
The text was updated successfully, but these errors were encountered: