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
fetch-mock not working after update to Node v18 #658
Comments
added test for s3 which does not work due to wheresrhys/fetch-mock#658
@mfernandes-alcumus Hey, I faced the same issue when migrating from Node v16 to Node v18. Use the You can read about why you are facing this issue here. https://nodejs.org/en/blog/announcements/v18-release-announce#fetch-experimental The global fetch in Node.js 18 is labeled as "experimental." This means it might not be fully stable or might have behaviors that differ from other fetch implementations. By using the --no-experimental-fetch flag, you're essentially reverting to the previous behavior, where there's no global fetch, making libraries like fetch-mock behave as expected. |
thanks @metart43 that is very helpful |
fetch is stable in Node.js 21 https://nodejs.org/en/blog/announcements/v21-release-announce#stable-fetchwebstreams, not experimental anymore |
Fetch is not getting mocked after updating to node v18
The text was updated successfully, but these errors were encountered: