Repository: deno
Issue: Error importing modules after updating dependencies
Labels: needs investigation

Version: Deno 1.44.0 and lower

For quite some time now (I'd say months or even years), when I update the Lume dependencies ([I have a task for that](https://github.com/lumeland/lume/blob/9ed353e2dc08ad3d62e475b04adac338b1153ee7/deno.json#L15)), and then [run the tests](https://github.com/lumeland/lume/blob/9ed353e2dc08ad3d62e475b04adac338b1153ee7/deno.json#L12) I have a lot of errors importing modules:

```
error: TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/temporal.ts"' has no exported member 'Temporal'.
import { Temporal } from "../../deps/temporal.ts";
         ~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/core/utils/date.ts:1:10

TS7006 [ERROR]: Parameter 'buffer' implicitly has an 'any' type.
  return icoEndec.encode(buffers.map((buffer) => buffer.buffer));
                                      ~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/deps/sharp.ts:11:39

TS2614 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/highlight.ts"' has no exported member 'HLJSOptions'. Did you mean to use 'import HLJSOptions from "file:///Users/oscarotero/www/lumeland/lume/deps/highlight.ts"' instead?
  HLJSOptions,
  ~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/code_highlight.ts:2:3

TS2614 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/highlight.ts"' has no exported member 'LanguageFn'. Did you mean to use 'import LanguageFn from "file:///Users/oscarotero/www/lumeland/lume/deps/highlight.ts"' instead?
  LanguageFn,
  ~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/code_highlight.ts:3:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/lightningcss.ts"' has no exported member 'bundleAsync'.
import { bundleAsync, transform } from "../deps/lightningcss.ts";
         ~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/lightningcss.ts:1:10

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/lightningcss.ts"' has no exported member 'transform'.
import { bundleAsync, transform } from "../deps/lightningcss.ts";
                      ~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/lightningcss.ts:1:23

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/lightningcss.ts"' has no exported member 'BundleAsyncOptions'.
  BundleAsyncOptions,
  ~~~~~~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/lightningcss.ts:12:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/lightningcss.ts"' has no exported member 'CustomAtRules'.
  CustomAtRules,
  ~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/lightningcss.ts:13:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/lightningcss.ts"' has no exported member 'TransformOptions'.
  TransformOptions,
  ~~~~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/lightningcss.ts:14:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'evalToken'.
  evalToken,
  ~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:2:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Liquid'.
  Liquid,
  ~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:3:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Tag'.
  Tag,
  ~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:4:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Tokenizer'.
  Tokenizer,
  ~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:5:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'TokenKind'.
  TokenKind,
  ~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:6:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'toPromise'.
  toPromise,
  ~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:7:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Value'.
  Value,
  ~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:8:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'ValueToken'.
  ValueToken,
  ~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:9:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Context'.
  Context,
  ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:19:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'Emitter'.
  Emitter,
  ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:20:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'TagToken'.
  TagToken,
  ~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:23:3

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/liquid.ts"' has no exported member 'TopLevelToken'.
  TopLevelToken,
  ~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:25:3

TS7019 [ERROR]: Rest parameter 'args' implicitly has an 'any[]' type.
        this.liquid.registerFilter(name, function (this: any, ...args) {
                                                              ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:110:63

TS2339 [ERROR]: Property 'liquid' does not exist on type '(Anonymous class)'.
        this.liquid.options.operators,
             ~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:214:14

TS2339 [ERROR]: Property 'liquid' does not exist on type '(Anonymous class)'.
      const r = this.liquid.renderer;
                     ~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/liquid.ts:238:22

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/mdx.ts"' has no exported member 'compile'.
import { compile, remarkGfm } from "../deps/mdx.ts";
         ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/mdx.ts:3:10

TS2614 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/satori.ts"' has no exported member 'SatoriOptions'. Did you mean to use 'import SatoriOptions from "file:///Users/oscarotero/www/lumeland/lume/deps/satori.ts"' instead?
import satori, { SatoriOptions } from "../deps/satori.ts";
                 ~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/og_images.ts:1:18

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/pug.ts"' has no exported member 'compile'.
import { compile } from "../deps/pug.ts";
         ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/pug.ts:1:10

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/pug.ts"' has no exported member 'Options'.
import type { Options as PugOptions } from "../deps/pug.ts";
              ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/pug.ts:8:15

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/sass.ts"' has no exported member 'compileStringAsync'.
import { compileStringAsync } from "../deps/sass.ts";
         ~~~~~~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/sass.ts:8:10

TS2305 [ERROR]: Module '"file:///Users/oscarotero/www/lumeland/lume/deps/sass.ts"' has no exported member 'StringOptions'.
import type { StringOptions } from "../deps/sass.ts";
              ~~~~~~~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/sass.ts:15:15

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    at file:///Users/oscarotero/www/lumeland/lume/plugins/terser.ts:61:11

TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
            .then((res) => res.matched)
                   ~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/unocss.ts:124:20

TS7006 [ERROR]: Parameter 'matched' implicitly has an 'any' type.
            .then((matched) => matched.forEach((match) => classes.add(match)))
                   ~~~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/unocss.ts:125:20

TS7006 [ERROR]: Parameter 'match' implicitly has an 'any' type.
            .then((matched) => matched.forEach((match) => classes.add(match)))
                                                ~~~~~
    at file:///Users/oscarotero/www/lumeland/lume/plugins/unocss.ts:125:49

Found 34 errors.
```

If I run the tests again, everything works fine without errors. The interesting thing is the errors are not only from the just updated dependency, but also others. In this case, I just updated Tailwind from `3.4.3 -> 3.4.4`, but as you can see, the errors are about packages like unocss, sass, Temporal, liquid, etc.

All these packages are NPM so maybe it's an issue regenerating the NPM dependency graph after a change?