I'm using NestJS with the module, using npm install poe-node-api
import { PoeClient } from 'poe-node-api';
const client = new PoeClient({ logLevel: 'debug' });
Getting Error
Error [ERR_REQUIRE_ESM]: require() of ES Module PROJECTFOLDER\node_modules\poe-node-api\dist\PoeClient.js from PROJECTFOLDER\dist\s1\s1.service.js not supported.
Instead change the require of PoeClient.js in PROJECTFOLDER\dist\s1\s1.service.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (PROJECTFOLDER\dist\s1\s1.service.js:14:21)
at Object.<anonymous> (PROJECTFOLDER\dist\s2\s2.service.js:16:21)
at Object.<anonymous> (PROJECTFOLDER\dist\s2\s2.module.js:12:22)
at Object.<anonymous> (PROJECTFOLDER\dist\app.module.js:16:21)
at Object.<anonymous> (PROJECTFOLDER\dist\main.js:6:20)
I'm using NestJS with the module, using
npm install poe-node-api
Getting Error
Any idea why ?