#deno check: Module '"internal:///missing_dependency.d.ts"' has no exported member...

15 messages · Page 1 of 1 (latest)

severe cypress
#

The sequence of events:

  • Upgraded to Deno 1.35.0
  • ran deno check on my code
  • got an error like the one described in https://github.com/denoland/deno/issues/11196 (AssertionError: data unexpectedly null)
  • tried the suggestion from that issue, namely replaced path with types in my triple slash reference comments
  • reran deno check
  • got the above error, the exported member being something that is declared in a file referenced by one of the above triple slash comments

Can provide more details and create a GitHub issue but wanted to post here in case folks are already on it.

GitHub

A.d.ts declare class Test { } test.ts /// <reference path="./A.d.ts" /> Output > deno run test.ts Check file:///V:/dprint-plugins/test.ts error: AssertionError: "data" ...

#

actually, looks like I get this type error now for everything imported from a module declared in an import map

#

also happens with Deno 1.34.3

#

and 1.34.2

#

and 1.34.1

#

and 1.34.0

#

and 1.33.4

#

and 1.32.4

#

I'll try to make a minimum reproducing example.

#

ok I think I figured it out: the error happens when the compiler can't resolve the path referenced by the triple slash

#

lmk if a MRE is desired

#

oh ya, and I figured this out by switching to v1.31.1 which reports the error correctly

severe cypress
#

bumping this because I'm running in to it again. Would be nice if this error message was more human-friendly.

alpine sapphire
#

@severe cypress could you please open an issue in the repo? A better error message with a suggestion how to fix it is definitely needed here

severe cypress