Skip to content

"Cannot find module 'http-status' or its corresponding type declarations." after migrating to 2.0.0 #53

Open
@dschuessler

Description

@dschuessler

Describe the bug

After upgrading to http-status 2.0.0, I get the following error on every import of the package.

src/controllers/metrics.controller.ts:2:24 – error TS2307: Cannot find module 'http-status' or its corresponding type declarations.

2 import httpStatus from 'http-status';
                         ~~~~~~~~~~~~~

To Reproduce

  1. Clone https://github.com/dschuessler/http-status-import-bug
  2. Run npm run build

Additional context

I consider this a bug since the README claims that, for ESM users, the import remains the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions