garronej / evt

💧EventEmitter's typesafe replacement

Home Page:https://evt.land

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After upgrading to Deno v1.9.0, running project results in TS2612 error

piccoloser opened this issue · comments

commented

I'm attempting to run a project, and the resulting error links to this module.

My project has the following dependencies:

  • deno.land/std/path
  • deno.land/x/opine
  • deno.land/x/http_errors
  • deno.land/x/dejs
  • deno.land/x/jsonfile
  • deno.land/x/denodb

Simply running deno run --allow-all mod.ts, which worked before upgrading to Deno v1.9.0, now exits with the following error:

TS2612 [ERROR]: Property 'resolve' will overwrite the base property in 'Deferred<undefined>'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.
    public readonly resolve!: () => void;
                    ~~~~~~~
    at https://deno.land/x/evt@v1.9.12/tools/Deferred.ts:57:21

I'm not sure which dependency may be invoking this line, and I haven't used evt directly. Trying to debug with the --inspect and --inspect-brk flags yielded no results in my case.

Hello, I just had the same issue, I know it's because of a dependency of Opine.

You are probably using an Opine version lower than v1.2.0. They stopped using evt as dependency some time ago (see https://github.com/asos-craigmorten/opine/blob/main/.github/CHANGELOG.md#120---06-03-2021)

If you use the newest you should be fine 😄 -> https://deno.land/x/opine@1.3.2/mod.ts

Anyway, it's fixed in evt v1.9.13. Thanks for reporting