node --experimental-fetch script.js

Category: Node.js & npm/yarn

node --experimental-fetch script.js

Enable the experimental built-in fetch API in older Node versions before it was stable

Enables the browser-compatible fetch() API in older Node versions before it was made stable in Node 18.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.