Closed Mister-Hope closed 2 years ago
Update, adding a types
declareation in exports
fild can be the easiest way, so I make a pr to solve issue like this when moduleResolution
is NodeNext
or Node16
:
packages/create/src/index.ts(2,21): error TS7016: Could not find a declaration file for module 'cac'. '/home/mister-hope/projects/vuepress-theme-hope/node_modules/.pnpm/cac@6.7.12/node_modules/cac/dist/index.mjs' implicitly has an 'any' type.
Try `npm i --save-dev @types/cac` if it exists or add a new declaration (.d.ts) file containing `declare module 'cac';`
:tada: This issue has been resolved in version 6.7.14 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Typescript cannot find cac types after switching modueResolution to NodeNext .
I think a .d.mts file should be added to avoid this error.