Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue using typescript with nodenext #143

Closed
Mister-Hope opened this issue Aug 23, 2022 · 2 comments
Closed

Issue using typescript with nodenext #143

Mister-Hope opened this issue Aug 23, 2022 · 2 comments
Labels

Comments

@Mister-Hope
Copy link
Contributor

Typescript cannot find cac types after switching modueResolution to NodeNext .

I think a .d.mts file should be added to avoid this error.

Screenshot_2022-08-24-01-24-14-78_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

@Mister-Hope
Copy link
Contributor Author

Mister-Hope commented Aug 24, 2022

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/[email protected]/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';`

@egoist egoist closed this as completed in 8342919 Aug 29, 2022
@egoist
Copy link
Collaborator

egoist commented Aug 29, 2022

🎉 This issue has been resolved in version 6.7.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants