Transitive dependency "cannot find module"
Hello, I have some code like this:
Now, calling this constructor runs some code that eventually tries to
const esbuild = require("esbuild");
. However, "esbuild"
is not in the deno environment. I tried to add an import map to my deno.json
:
But Deno does not seem to do the import-mapping in a transitive fashion. Any tips on how I can get this to work? I really dont want to have to have a package.json and just having the one .ts
file is really awesome (if I could get rid of the usage of deno.json
here too it would be amazing)1 Reply
I am not quite sure the cause of this. Maybe it is because
esbuild
is not referenced in the dependencies of @finos/perspective-esbuild-plugin
? I am working around it for now by vendoring the package, and using a workspace
directive in my deno.json
I also had to update the code to use ESModules instead of the old require syntax