import fetch from "node-fetch";
More and more node.js modules are being converted to clean ESM modules like in case of node-fetch v3. This can result breaking changes which results in the following error message:
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using require to load an ES module is not supported because ES modules have asynchronous execution. Instead, use import() to load an ES module.