Davis
Davis
DDeno
Created by Davis on 12/28/2024 in #help
Transitive dependency "cannot find module"
Hello, I have some code like this:
import { PerspectiveEsbuildPlugin } from "npm:@finos/perspective-esbuild-plugin@3.2.0";
new PerspectiveEsbuildPlugin();
import { PerspectiveEsbuildPlugin } from "npm:@finos/perspective-esbuild-plugin@3.2.0";
new PerspectiveEsbuildPlugin();
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:
{
"imports": {
"esbuild": "https://deno.land/x/esbuild@v0.24.1/mod.js"
}
}
{
"imports": {
"esbuild": "https://deno.land/x/esbuild@v0.24.1/mod.js"
}
}
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)
3 replies