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

Type Error for Dialog.Panel: ts(2339) #1419

Closed
felixhaeberle opened this issue May 8, 2022 · 2 comments
Closed

Type Error for Dialog.Panel: ts(2339) #1419

felixhaeberle opened this issue May 8, 2022 · 2 comments

Comments

@felixhaeberle
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

latest

Describe your issue

There is a type error with Dialog.Panel in the latest version. VS Code can't find the type of Panel

error TS2339: Property 'Panel' does not exist on type '(<TTag extends ElementType<any> = "div">(props: Props<TTag, DialogRenderPropArg, DialogPropsWeControl> & (({ static?: undefined; } & { ...; }) | ({ ...; } & { ...; })) & { ...; }, ref: Ref<...>) => Element) & { ...; } & { ...; }'.

75               </Dialog.Panel>
@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

Here is a list of things to try:

  1. Restart VS Code, sounds silly but a lot of people report "issues" on Discord and after a restart it is fixed.
  2. Make sure that you are on the latest version npm install @headlessui/react@latest
  3. Restart the TypeScript Language Server (tsserver). A restart/reload of VS Code should do the same thing.

Here is a very basic CodeSandbox with React, TypeScript and Headless UI proving that Dialog.Panel does exist. https://codesandbox.io/s/laughing-edison-182d99?file=/src/App.tsx

@jerriclynsjohn
Copy link

jerriclynsjohn commented Aug 5, 2023

I'm facing this problem when i install using npm install @headlessui/react@insiders

P.S. I have NodeNext as module resolution

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

No branches or pull requests

3 participants