bradtraversy / coindex-cli

Node.js CLI for checking crypto prices
78 stars 23 forks source link

Facing a problem with module #8

Open freakingfab opened 2 years ago

freakingfab commented 2 years ago

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\node_modules\configstore\index.js from C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\lib\KeyManager.js not supported. Instead change the require of index.js in C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\lib\KeyManager.js to a dynamic import() which is available in all CommonJS modules. at Object. (C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\lib\KeyManager.js:1:19) at Object. (C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\commands\key.js:3:20) at Object. (C:\Users\Daksh\OneDrive\Desktop\webd\coindex-CLI2\bin\coindex-key.js:2:13) { code: 'ERR_REQUIRE_ESM' }

Kimkykie commented 2 years ago

Hello,

You might have to switch to version 5 of configstore, version 6 which is the latest version is now an ESM.

The other option is esm enabling, you can find the guide here ESM enabling. I hope this helps.