Version of browser: Brave Version 1.19.92 Chromium: 88.0.4324.152 (Official Build) (x86_64)
Version of geist-ui/react: 2.1.3
Expection
I'd expect to be able to run a nextjs project with geist in a monorepo using yarn workspaces.
Actual results (or Errors)
If i try and run a next project with geist installed in a monorepo (using yarn workspaces), i get the following error:
Error: 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
Workaround (but suboptimal)
It seems to be due to a yarn workspaces hoisting issue when geist is hoisted to the root node_modules of the monorepo. If i set the nextproject to nohoist the issue goes away. (but this is suboptimal)
Gonna close this. After further investigation, it looks like a clash being caused by a Strapi.io project within the monorepo. That seems to be the culprit.
Bug report 🐞
Version & Environment
geist-ui/react
:2.1.3
Expection
I'd expect to be able to run a nextjs project with geist in a monorepo using yarn workspaces.
Actual results (or Errors)
If i try and run a next project with geist installed in a monorepo (using yarn workspaces), i get the following error:
Workaround (but suboptimal)
It seems to be due to a yarn workspaces hoisting issue when geist is hoisted to the root
node_modules
of the monorepo. If i set thenextproject
tonohoist
the issue goes away. (but this is suboptimal)Is Geist performing any actions that require it to be in the project level
node_modules
?