I run into a problem when installing gatsby plugins.
My Setup:
npm install -g gatsby-cli
gatsby new my-app
gatsby develop
When I try to install a plugin from the Gatsby library im getting this error message after installing the plugin:
Error: Invalid hook call. Hooks can only be called inside of the bo dy of a function component. This could happen for one of the follow ing reasons:
- You might have mismatching versions of React and the renderer (s uch as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app See fb.me/react-invalid-hook-call for tips about how to deb ug and fix this problem.
Is there something wrong with my dep tree?
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]
gatsby-config.js
. Try removingnode_modules
and.cache
folder and install your dependencies again. – Ferran Buireunpm install -g gatsby-cli
installs the Gatsby client. You need to remove the/node_modules
folder insidemy-app
and.cache
– Ferran Buireu