4 ms·
I think this requires the `--experimental-fetch` command-line argument (per https://nodejs.org/tr/blog/release/v17.5.0/ https://nodejs.org/tr/blog/release/v17.5
by jitl 4y ago
I think this requires the `--experimental-fetch` command-line argument (per https://nodejs.org/tr/blog/release/v17.5.0/ https://nodejs.org/tr/blog/release/v17.5.0/), so I don't think it qualifies as "by default".
- wging 4y agoThat's an old blog post; the current release is 18.4.0, which supports `fetch` without a command-line argument. You do get this warning the first time it's invoked, though: (node:340760) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created) (some later blog posts that mention fetch being enabled-by-default and in the global scope are https://nodejs.org/en/blog/announcements/v18-release-announce/ https://nodejs.org/en/blog/announcements/v18-release-announc... and https://nodejs.org/en/blog/release/v18.0.0/ https://nodejs.org/en/blog/release/v18.0.0/)
- wdb 4y agoYeah, but you could use `undici`-package for older Node version as it is being used to provide this experimental Fetch in Node 17+