SyntaxError: The requested module 'react' does not provide an export named 'useCallback'
See original GitHub issueWhat package within Headless UI are you using?
What version of that package are you using?
^1.5.0
What browser are you using?
Firefox 98.0.2
Reproduction URL
https://github.com/soasada/nextjs-tailwindcss-example
Describe your issue
When I literally copy and paste the Popover component in a fresh project with: Next.js 12.1.4, React 18 (and also 17), Typescript 4.6.3, starts failing with the following error:
SyntaxError: The requested module 'react' does not provide an export named 'useCallback'
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
The requested module 'react' does not provide an export ...
everything is fine but i don't know why this error is come when i reomove headles ui components then working fine but when...
Read more >module 'react' does not provide an export named 'useRef'
Hi, I recently tried to update to nextjs12 and react18 to see if there would be any problems upgrading and I've run into...
Read more >How do I fix "the requested module does not provide an export ...
The reason it didn't work is that Vue provides a named export, whereas you are trying to import it as though it had...
Read more >Requested module does not provide export named 'default'
To solve the error "The requested module does not provide an export named default", use the `default` keyword when exporting a value from...
Read more >the requested module 'react' does not provide an ... - You.com
The reason it didn't work is that Vue provides a named export, whereas you are trying to import it as though it had...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Aha, clear! That did the trick idd, thanks!
I am having the same issue deploying to Cloudflare Pages. Downgrading from 1.5.0 -> 1.4.3 fixes the issue.