Closed NicolaiF closed 4 years ago
Based on the error message, it looks like your app is using an older version of @reach/menu-button
for whatever reason. Specifically noted on line 83 where it's calling useDescendants
. In 0.10.5, that should be useDescendantsInit
. https://unpkg.com/browse/@reach/menu-button@0.10.5/dist/menu-button.esm.js
Can you double check your yarn.lock/package-lock file for the correct version here? Might be worth nuking node_modules
and reinstalling as well.
Wow, that actually seemed to do the trick. Node_modules had some weird inconsistencies in versioning of @reach-packages, so I nuked, and for safety added a resolution for both descendants and menu-button for version 0.10.5, and reinstalled node_modules.
Thanks a bunch! This issue can be closed now
🐛 Bug report
Current Behavior
I've made a wrapper for the MenuButton-component, and trying to use it in my Gatsby-project, and I get this error message.
Here's the the component:
And the component in use
I've not been able to reproduce it yet, but will update if I find a way to do so. This error has also appeared in other users' environments, where gatsby was not used.
The reason I mention my wrapper-component, is that the problem dissapears (for me, not the other user) if I'm using the reach-components directly instead
Additional context
Here is a screenshot of my error
Your environment
My package.json
Dependencies for the other user with the same error