node-http-status
node-http-status copied to clipboard
"Cannot find module 'http-status' or its corresponding type declarations." after migrating to 2.0.0
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
- Clone https://github.com/dschuessler/http-status-import-bug
- Run
npm run build
Additional context
I consider this a bug since the README claims that, for ESM users, the import remains the same.