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
0.4.6 not exporting components correctly #3733
Comments
Hi @FlorianBurgevin! Could you please provide a repro? It's working well here: https://stackblitz.com/edit/qh8kyv?file=package.json,popover-selection%2Findex.tsx&theme=dark |
Hi @diegohaz Hum that's weird. I see the correct export in my node modules but my project seems not to resolve the following export
It doesn't find the declaration to go. But that's ok in your example In your project, it resolves esm so it's ok, but i'm resolving cjs. And in previous version, the index.d.ts in CJS has those lines: |
I am also encountering this problem with |
When I switch back to |
I'm unable to replicate this issue myself, so I'd appreciate a StackBlitz, CodeSandbox, or even a repository link that demonstrates the problem. It's also not clear whether the components aren't being exported at all, as the initial report implies, or if it's solely a TypeScript compiler issue. In other words, if you ignore the TypeScript errors, are the components still visible on the page? If it's only a TypeScript problem, I'd recommend trying the It would also help if you could specify whether you're using ESM or CJS (in which case I highly recommend you to migrate to ESM as soon as possible). |
Hi @diegohaz ! Here is a reproductible stackblitz: https://stackblitz.com/edit/webpack-5-react-starter-khsjx9?file=src%2Fpopover-selection%2Findex.tsx I reused your example. As you can see, with 0.4.6, there is TS errors in the Console saying that elements are not exported. |
@FlorianBurgevin, thanks for providing the reproduction. It appears to be an issue with the TypeScript v4 compiler. I'll look into what we can do on our end, but please note that TypeScript v5 was released over a year ago. If it's possible for you to upgrade, I'd strongly suggest doing so. |
Oh jeh that was actually my problem, thanks 👍🏻 |
Ok thanks @diegohaz I'll try to upgrade to TypeScript 5 waiting for a fix :) |
Current behavior
Hello.
I am importing some components from the library.
import { usePopoverStore, Popover, PopoverDisclosure } from '@ariakit/react';
But when i update to last version 0.4.6, components are not exported anymore.
Steps to reproduce the bug
#3733 (comment)
Expected behavior
I should get my components
Workaround
Upgrade to TypeScript v5
Possible solutions
No response
The text was updated successfully, but these errors were encountered: