Open marvinhagemeister opened 1 week ago
Ah I think I know what the reason is: Like in the snippet, @babel/core
doesn't ship with type definitions and needs @types/babel__core
for that. This in turn pulls in @babel/traverse
which doesn't ship with type definitions either and would need to fall back to @types/babel__traverse
. But we don't seem to be able to do that. Same happens for some other babel modules.
DEBUG TS - specifiers: @babel/generator, @babel/parser, @babel/template, @babel/traverse, @babel/types, @babel/parser
DEBUG RS - deno::npm::managed:531 - Resolved @babel/generator from file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@types/babel__core/7.20.5/index.d.ts to /Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@babel/generator/7.24.7
DEBUG RS - deno::tsc:681 - Resolved @babel/generator to ("internal:///missing_dependency.d.ts", ".d.ts")
DEBUG RS - deno::npm::managed:531 - Resolved @babel/parser from file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@types/babel__core/7.20.5/index.d.ts to /Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@babel/parser/7.24.7
DEBUG RS - deno::tsc:681 - Resolved @babel/parser to ("file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@babel/parser/7.24.7/typings/babel-parser.d.ts", ".d.cts")
DEBUG RS - deno::npm::managed:531 - Resolved @babel/template from file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@types/babel__core/7.20.5/index.d.ts to /Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@babel/template/7.24.7
DEBUG RS - deno::tsc:681 - Resolved @babel/template to ("internal:///missing_dependency.d.ts", ".d.ts")
DEBUG RS - deno::npm::managed:531 - Resolved @babel/traverse from file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@types/babel__core/7.20.5/index.d.ts to /Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/@babel/traverse/7.24.7
DEBUG RS - deno::tsc:681 - Resolved @babel/traverse to ("internal:///missing_dependency.d.ts", ".d.ts")
I guess we need smarter integration with DefinitelyTyped here.
Noticed that the babel visitor types don't work in Deno. They work when using Node though. Spent some time digging into this but couldn't find out why it doesn't work in Deno. Both the LSP and
deno check
will complain about_nodePath
being of typeany
in Deno. I cancmd+click
through the types though and they are all there.Steps to reproduce
Version: Deno 1.44.4