You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// test.ts
import unleet from '@cityssm/unleet'
unleet('b@d w0rd')
If I run either yarn ts-node test.ts or yarn tsc test.ts && node test.js I get the following error:
var unleet_1 = require("@cityssm/unleet");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/eodeluga/src/test/node_modules/@cityssm/unleet/index.js from /home/eodeluga/test/test.js not supported.
Instead change the require of index.js in /home/eodeluga/src/test/test.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/eodeluga/src/test/test.js:3:16) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.18.0
The text was updated successfully, but these errors were encountered:
If I run either
yarn ts-node test.ts
oryarn tsc test.ts && node test.js
I get the following error:The text was updated successfully, but these errors were encountered: