node-http-status icon indicating copy to clipboard operation
node-http-status copied to clipboard

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

Open dschuessler opened this issue 1 year ago • 8 comments

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.

dschuessler avatar Nov 06 '24 12:11 dschuessler