Skip to content

Type 'typeof FormData' has no construct signatures.ts(2351) #2

@sisp

Description

@sisp

I'm getting a Typescript (v3.9.7) error for this line (in the template):

This expression is not constructable.
  Type 'typeof FormData' has no construct signatures.ts(2351)
api.ts(9, 1): Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.

When I change the FormData import, it works fine:

-import * as FormData from "form-data"
+import FormData from "form-data"

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions