Robert Chandler
04/25/2022, 12:05 AMreact.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
When these frontends were located in separate repos they both used React 17, now they're in with the serverless stack they're both using React 18 despite the root node_modules
having React 17 in it and all package.json
files have "^17.0.2"
as the version.
The repo is setup with a package.json
in the root which includes workspaces for the two frontend directories which each have their own package.json
, I'm currently using npm
Any help would be much appreciated, I've been trying to work this out for the last few hours! 🤯thdxr
04/25/2022, 12:08 AMthdxr
04/25/2022, 12:08 AMRobert Chandler
04/26/2022, 4:39 PMyarn
over npm
resolved the issue