abiA
Deno3y ago
5 replies
abi

Deno and `npm:mongodb` problem with `node:`?

❯ deno check --reload main.ts
error: Relative import path "net" not prefixed with / or ./ or ../ and not in import map from "file:///Users/.../Library/Caches/deno/npm/registry.npmjs.org/mongodb/5.6.0/mongodb.d.ts"
If you want to use a built-in Node module, add a "node:" prefix (ex. "node:net").
    at file:///Users/.../Library/Caches/deno/npm/registry.npmjs.org/mongodb/5.6.0/mongodb.d.ts:29:29


I'm simply importing stuff from npm:mongodb@5.6.0, why doesn't Deno understand this thing now?
Was this page helpful?