iceghost
iceghost
Explore posts from servers
DDeno
Created by iceghost on 12/3/2023 in #help
Transitive dependencies with node_modules
Hi all, today I stumbled upon this not-sure-if-a-bug:
import { LRParser } from "npm:@lezer/[email protected]";
import { LRLanguage } from "npm:@codemirror/[email protected]";

LRLanguage.define({
parser: LRParser.deserialize(undefined),
});
import { LRParser } from "npm:@lezer/[email protected]";
import { LRLanguage } from "npm:@codemirror/[email protected]";

LRLanguage.define({
parser: LRParser.deserialize(undefined),
});
Checking the lock file, there is no duplicated package with different version. Running without nodeModulesDir config works, but otherwise, typescript has this error:
Type 'import("file:///tmp/deno-test/node_modules/.deno/@[email protected]/node_modules/@lezer/lr/dist/index").LRParser' is not assignable to type 'import("file:///tmp/deno-test/node_modules/.deno/@[email protected]/node_modules/@lezer/lr/dist/index").LRParser'.
Type 'import("file:///tmp/deno-test/node_modules/.deno/@[email protected]/node_modules/@lezer/lr/dist/index").LRParser' is not assignable to type 'import("file:///tmp/deno-test/node_modules/.deno/@[email protected]/node_modules/@lezer/lr/dist/index").LRParser'.
Should I report this bug? (I can live without toggling node_modules for now)
2 replies