moubliniM
Denoβ€’4y agoβ€’
8 replies
moublini

Dynamically imported module evaluation is still pending

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}`);
    
}
Was this page helpful?