Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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

// mod.cjs
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #Solution #Error #ES #Module
ADD COMMENT
Topic
Name
7+6 =