DenoDDeno
Powered by
DavisD
Denoβ€’15mo agoβ€’
2 replies
Davis

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");
const esbuild = require("esbuild");
. However,
"esbuild"
"esbuild"
is not in the deno environment. I tried to add an import map to my
deno.json
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
.ts
file is really awesome (if I could get rid of the usage of
deno.json
deno.json
here too it would be amazing)
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Transitive dependency module not found?
MTAEMMTAE / help
16mo ago
Cannot find module
OlynoOOlyno / help
3y ago
Cannot find module
alchemiztAalchemizt / help
3y ago
Cannot find module Error
msvMmsv / help
2y ago