"TS2729 [ERROR]: Property 'boundary' used before its initialization" in extern library

Viewed 111

After updating my deno version to 1.9 today I had started having the following problem when running my tests or my scripts:

TS2729 [ERROR]: Property 'boundary' is used before its initialization.
  readonly dashBoundary = encoder.encode(`--${this.boundary}`);
                                               ~~~~~~~~
    at https://deno.land/std@0.63.0/mime/multipart.ts:266:52

'boundary' is declared here.
  constructor(reader: Deno.Reader, private boundary: string) {
                                   ~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.63.0/mime/multipart.ts:269:36

I checked and I am not using the mime repository anywhere in my code, instead some other repositories must use it.

I am using the following repositories:

  1. x/abc
  2. std/uuid
  3. std/fs
  4. std/path
  5. std/fmt
  6. std/testing

I made sure that I am explicitely using the newest version for all of the imports of the std library (std version 0.93.0).

When I am running the files that are importing the std library (instead of running the entire application) no errors occur.

Does anyone have an idea how to resolve the error?

1 Answers

It seems like the repository x/abc was the problem.

I did not add a version when importing it implicitly. When importing implicitly it in the following way it worked:

import abc from "https://deno.land/x/abc@v1.3.1/mod.ts";
Related