question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Got undefined error from Dialog

See original GitHub issue

Hi @RobinMalfait,

I’m using headlessui/react@dev and I’m going through an error with the Dialog component:

TypeError: Cannot read property 'Overlay' of undefined

Here the code, copy/pasted from the documentation:

<Dialog open={showForm} onClose={setShowForm}>
  <Dialog.Overlay />

  <Dialog.Title>Deactivate account</Dialog.Title>
  <Dialog.Description>This will permanently deactivate your account</Dialog.Description>

  <p>
      Are you sure you want to deactivate your account? All of your data will be permanently
      removed. This action cannot be undone.
  </p>

  <button onClick={() => setShowForm(false)}>Deactivate</button>
  <button onClick={() => setShowForm(false)}>Cancel</button>
</Dialog>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
paperfella-ceocommented, Mar 2, 2021

I got the same problem

1reaction
RobinMalfaitcommented, Mar 5, 2021

@ChristoRibeiro make it a pinned version like "@headlessui/react": "0.3.1-d519f7d" (without the caret). Also nuke your node_modules just in case! See this reply: https://github.com/tailwindlabs/headlessui/issues/269#issuecomment-791333952

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of undefined error when closing a dialog box?
When you close your dialog, you don't pass anything to the close function, therefore the contractors value will be undefined in your ...
Read more >
When opening a page for edit a dialog with an undefined error ...
When opening a page for edit a dialog with an undefined error is displayed. There is a 404 error in the browser's console....
Read more >
Dialog plugin got undefined refs when using async component
Describe the bug Using async component in dialog custom component this.$q.dialog({ component: () => import('./async-comp.vue'), parent: this } ...
Read more >
Script Error dialog on sign in with 'Promise' is undefined error ...
Error : 'Promise' is undefined. Screenshot of script error dialog. Otherwise, a "Connection Failure" message displays but never completes.
Read more >
"'fileName' is undefined" error when you open the printer Help ...
Fixes an issue that occurs when you try to open the printer Help file from the Printer Properties dialog box. This issue occurs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found