I'm very confused on the error i put as the title because in my program i'm trying to just import some files in a directory and i get this really not self explainatory error, does somebody know anything? Thanks 😁
Code:
const comuneEventDir = path.resolve(__dirname, './events');
const eventDir = Deno.readDirSync(comuneEventDir);
for (const file of eventDir) {
if (!file.name.match(/^.*\.ts$/)) continue;
console.log(`importing ${comuneEventDir}/${file.name}...`)
await import(`${comuneEventDir}/${file.name}`);
}```