ESM adapter Import ESM modules from CommonJS. Installation requires node-gyp. const adapter = require('adapter'); const esmModule = adapter('some-esm-module'); This adapter is based on deasync and on the dynamic import().