Error [ERR_REQUIRE_ESM]: require() of ES Module … not supported
The current version of node-fetch is ONLY compatible with an ESM import (using import), not from CommonJS modules using require(). You have these choices to fix: Switch your project to an ESM module and load it with import fetch from ‘node-fetch’;. In a very recent version of nodejs, you can dynamically import an ESM module … Read more