Dexare / Voltare

⚡ Modular and extendable Revolt bot framework.
MIT License
15 stars 1 forks source link

ESM error #20

Closed sawa-ko closed 2 years ago

sawa-ko commented 2 years ago

I want to use this package but I run into the problem of:

..\node_modules\voltare\lib\client\index.js:26
const Revolt = __importStar(require("revolt.js"));
                            ^

Error [ERR_REQUIRE_ESM]: require() of ES Module ..\node_modules\revolt.js\dist\index.js from ..\node_modules\voltare\lib\client\index.js not supported.
Instead change the require of ..\node_modules\revolt.js\dist\index.js in ..\node_modules\voltare\lib\client\index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (..\node_modules\voltare\lib\client\index.js:26:29)
    at Object.<anonymous> (..\node_modules\voltare\lib\index.js:29:34) {
  code: 'ERR_REQUIRE_ESM'
}

I have added the property "type": "module" to the package.json file but it doesn't work either, I have also changed the target of the tsconfig.json file and it doesn't work either.

Snazzah commented 2 years ago

In terms of not using ESM, it's probably better if I do a major release to move to ESM for this package.

ohxxm commented 2 years ago

In terms of not using ESM, it's probably better if I do a major release to move to ESM for this package.

Any ETA on this?

Snazzah commented 2 years ago

Released v1.0.0.