You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typescript can't find types for a husky v9 import when using "moduleResolution": "node". It seems to work with "moduleResolution": "nodenext" (but that causes other issues for me.
It's unclear from the release notes whether this is intended as part of the nodejs 14/16 support drop. Feel free to close if it's expected.
index.ts:1:19 - error TS2307: Cannot find module 'husky' or its corresponding type declarations.
1 import husky from 'husky';
~~~~~~~
Found 1 error in index.ts:1
Description
Typescript can't find types for a husky v9 import when using
"moduleResolution": "node"
. It seems to work with"moduleResolution": "nodenext"
(but that causes other issues for me.It's unclear from the release notes whether this is intended as part of the nodejs 14/16 support drop. Feel free to close if it's expected.
Steps to Reproduce
pnpm i
(I also tested with npm, no difference)npx tsc -p tsconfig-nodenext.json
- successnpx tsc -p tsconfig-node.json
This also confirms it's the types in the published package causing this issue with this particular
moduleResolution
, not some quirk of my setup: https://arethetypeswrong.github.io/?p=husky%409.0.11Again, not sure if this is intended.
The text was updated successfully, but these errors were encountered: