DenoDDeno
Powered by
UnknownErrorU
Denoβ€’2y agoβ€’
17 replies
UnknownError

Cannot find CanvasRenderingContext2D

I am trying to use deno for a web target. Just to transpile all the TypeScript source code into a single JavaScript target. I am compiling with
deno bundle --watch src/index.ts package.js --unstable-sloppy-imports
deno bundle --watch src/index.ts package.js --unstable-sloppy-imports
. With a fairly simple
tsconfig.json
tsconfig.json
:
{
  "compilerOptions": {
    "target": "ESNext",
    "lib": [
      "DOM",
      "ESNext"
    ],
    "module": "ESNext",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}
{
  "compilerOptions": {
    "target": "ESNext",
    "lib": [
      "DOM",
      "ESNext"
    ],
    "module": "ESNext",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}

This is the first time I am using deno, so I'm not really sure if deno requires that I bring in some type hints for a native web target or to adjust the tsconfig.json (or if deno even uses this file) or add in additional cli commands to specify that this will be a web target. But deno currently cannot find
CanvasRenderingContext2D
CanvasRenderingContext2D
.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

cannot find env
grontylionGgrontylion / help
3mo ago
Cannot find module
OlynoOOlyno / help
3y ago
Cannot find module
alchemiztAalchemizt / help
3y ago
Cannot find module Error
msvMmsv / help
2y ago