CanadaHonkC
Denoβ€’2y agoβ€’
1 reply
CanadaHonk

Dynamically importing NPM modules errors

The following works fine in Node:
const parser = 'acorn';
const { parse } = await import(parser);


But with Deno gives the error:
Uncaught (in promise) TypeError: Loading unprepared module: npm:acorn@^8.9.0


Not sure what I should do to "prepare" it since I can't find any information on it?
Was this page helpful?