Linked package - React peer dependency issue #4004
Unanswered
jugglingcats
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to debug an issue integrating one of our React lib projects into a new create-react-app project. To do this I'm using
pnpm link
from the CRA project to the lib so I can hack on it and find the issue without having to publish to npm. The linking causes an issue because the lib pulls in a duplicate copy of React (they are the same version) and this causes the dreaded rules of hooks error.I tried to work around it using a
.pnpmfile.cjs
to knock out the peer dependency of the lib project, but it seems thereadPackage
hook is not called for linked packages. Perhaps this is by design.Any help appreciated.
Beta Was this translation helpful? Give feedback.
All reactions