Open kickbk opened 1 year ago
I've struggled with the same issue and nohoist
options aren't working in pnpm if using node-linker=hoisted
(https://github.com/pnpm/pnpm/discussions/5651)
I've struggled with the same issue and
nohoist
options aren't working in pnpm if usingnode-linker=hoisted
(pnpm/pnpm#5651)
Actually, we worked on that node-linker=hoisted
issue and it's resolved. Just update pnpm.
I'm still facing the issue where hoisted packages end up getting installed in apps and packages instead of the root resulting in multiple versions. I just moved all dependencies to the apps, which works, but it kinda beats the purpose of hoisting.
Actually, we worked on that node-linker=hoisted issue and it's resolved. Just update pnpm.
Can you link to the exact change/version that resolved it? 🙏 I can't seem to find any fixes related to this
I'm using pnpm 7.26.3 and it works. However, unless installing the packages stalls for you, it's actually working. If it completed the installation and you're not seeing packages you expect to be hoisted get hoisted, then you're not alone ;) I ended up moving most packages to the app package.json
.
If you add
"react-native-reanimated": "~2.12.0"
todependencies
inapps/mobile
and inpackages/feature-home
, then react-native-reanimated will be installed inside node_modules ofapps/mobile
and in the root, but not inpackages/feature-home
.I'm not entirely sure if this is intended. I thought when the versions match it will be hoisted to the root node_modules and should not install in apps/mobile?
Regardless, when you then build the app and install it, then try to run it, it will crash during the splash screen and complain about multiple versions of react-native-reanimated.
This is true for several other packages.
Interestingly enough, if you add
"react-native-elements": "^4.0.0-rc.2"
for instance todependencies
of bothapps/mobile
andpackages/feature-home
, then that package will not be installed inapps/mobile
and only in the root.So if this is how hoisting is supposed to work, then it doesn't work for all packages. Not sure why not.