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

Unable to import @formkit/themes/tailwindcss with TypeScript #376

Closed
dzcpy opened this issue Sep 5, 2022 · 4 comments
Closed

Unable to import @formkit/themes/tailwindcss with TypeScript #376

dzcpy opened this issue Sep 5, 2022 · 4 comments
Labels
🐛 bug-report Bug is reported, but not verified by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch

Comments

@dzcpy
Copy link

dzcpy commented Sep 5, 2022

Reproduction

https://codesandbox.io/s/goofy-currying-rnursq?file=/tailwind.config.ts

Describe the bug

image

Error message:
Cannot find module '@formkit/themes/tailwindcss' or its corresponding type declarations.ts(2307)

Environment

• OS: not related
• Browser: not related
• Version: ^1.0.0-beta.11-0dd967c

@dzcpy dzcpy added the 🐛 bug-report Bug is reported, but not verified by team label Sep 5, 2022
@justin-schroeder
Copy link
Member

We'll need more information than this — what build tool are you use (nuxt/vite etc) what version of node. Ideally you could provide a reproduction.

@dzcpy
Copy link
Author

dzcpy commented Sep 6, 2022

Well I'm using nuxt 3, but I think the issue is platform / configuration agnostic. The problem is that there is no actual typescript type for it. Here is the test enviroment:
https://codesandbox.io/s/goofy-currying-rnursq?file=/tailwind.config.ts

@fenilli
Copy link
Contributor

fenilli commented Sep 7, 2022

For now you can use import tailwind from "@formkit/themes/dist/tailwindcss"; instead, there are typescript types for it, but they are being read by the package.json exports types, maybe something wrong there or nuxt does not read them correctly.

@fenilli
Copy link
Contributor

fenilli commented Sep 7, 2022

After looking it up it seens to not be a bug with formkit but with typescript itself as per #33079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug-report Bug is reported, but not verified by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch
Projects
None yet
Development

No branches or pull requests

4 participants