Mokshit06 / typewind

The safety of Typescript with the magic of Tailwind.

Home Page:https://typewind.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'typewind/transform' or its corresponding type declarations.

danieldunderfelt opened this issue · comments

I installed Typewind in a quite new and non-modified T3 app (which uses Next.js) and set it up according to the documentation. When trying to add the transform in tailwind.config.cjs, the import has the following error:

Cannot find module 'typewind/transform' or its corresponding type declarations.

My tsconfig.json file looks pretty much the same as in the Typewind Next.js example.

Typewind version: 0.1.3
Typescript version: 4.9.5
Tailwind version: 3.2.0

That's quite weird. Typewind's package.json uses the exports field to declare the export paths and their type definitions, so typescript should have picked them up. You can just write @ts-ignore above the import for now, I'll give it a look.
https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing
https://github.com/Mokshit06/typewind/blob/main/packages/typewind/package.json

Should be fixed with later versions of Typescript.