Answers for "Solution for Error [ERR_REQUIRE_ESM]: require() of ES Module"

0

Solution for Error [ERR_REQUIRE_ESM]: require() of ES Module

// mod.cjs
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
Posted by: Guest on September-01-2021

Code answers related to "Solution for Error [ERR_REQUIRE_ESM]: require() of ES Module"

Code answers related to "Javascript"

Browse Popular Code Answers by Language