react-native-template-new-architecture
                                
                                
                                
                                    react-native-template-new-architecture copied to clipboard
                            
                            
                            
                        Upgrade Yarn 3.2.1 to 4.0.0-rc.9+
Only issue in Linux CI, macOS 13b locally is fine
Latest checked: rc.14
Ubuntu2204 (20220605.1)
yarn install
โค YN0000: โ Resolution step
โค YN0078: โ Invalid resolution node-forge@npm:^0.10.0 โ npm:1.2.1 (yarn why: ... RN Flipper)
โค YN0000: โ Completed
โค YN0000: Failed with errors in 0s 137ms
- revert yarn.lock (v4 -> v3)
 - revert (old v3) resolution commit
 - yarn install (regen v4 lockfile)
 
yarn --check-resolutions
โค YN0000: โ Resolution step
โค YN0078: โ Invalid resolution prismjs@npm:~1.17.0 โ npm:1.26.0 (yarn why: ... @storybook)
โค YN0000: โ Completed
โค YN0000: Failed with errors in 0s 137ms
- repeat
 
Similar on macOS Monterey 12.5 Beta
- doesn't block 
yarn install - detected via 
yarn --check-resolutions 
Next step
- https://github.com/yarnpkg/berry/pull/4302#issuecomment-1155272717
 - [x] delete lockfile -> install v4?
 
Follow-up
- https://github.com/leotm/react-native-template-new-architecture/pull/846
 
Still need to undo resolutions
Close: #671
Check
https://github.com/yarnpkg/berry/pull/4218- https://github.com/yarnpkg/berry/pull/4302
- showing up on macOS too
 - but no install blocker
 
 
Yarn 4.0.0-rc.9 --check-resolutions (can't check in v3) recognising all prev/old v3 (manual) set resolutions Invalid
yarn set version canary
yarn install
yarn --check-resolutions
โค YN0000: โ Resolution step
โค YN0078: โ Invalid resolution node-forge@npm:^0.10.0 โ npm:1.2.1 (yarn why: ... RN Flipper)
โค YN0000: โ Completed
โค YN0000: Failed with errors in 0s 137ms
revert yarn.lock (v4 -> v3)
revert (old v3) resolution commit
yarn install (regen v4 lockfile)
yarn --check-resolutions
โค YN0000: โ Resolution step
โค YN0078: โ Invalid resolution prismjs@npm:~1.17.0 โ npm:1.26.0 (yarn why: ... @storybook)
โค YN0000: โ Completed
โค YN0000: Failed with errors in 0s 137ms
yarn install blocker on Ubuntu, not on macOS but still detected
yarn patch --revert-all --dev-deps needed ๐
 or yarn reset resolutions -D or lockfile codemod
edit: ok only few
- https://github.com/leotm/react-native-template-new-architecture/commit/5bc69b5dbf674ee2f5a17e52909c62690453e6ef
 - https://github.com/leotm/react-native-template-new-architecture/commit/3f40bbeca4536a5c991e0151a7cf93b387fb9105
 - https://github.com/leotm/react-native-template-new-architecture/commit/447031e281cafb5d21c16226fcfa24244f8ad5e6
 - https://github.com/leotm/react-native-template-new-architecture/commit/a04b501b439b492c3c30423271dc0cba8ca64898
 - https://github.com/leotm/react-native-template-new-architecture/commit/f435cd05209af8af612214210314855da8888bdb
 
shouldn't be necessary to upg Yarn v3 -> v4 ๐ค
temp: revert commits in order
solution: difficult w/o commit hist since lockfile snapshot overwritten 5x
hack: delete yarn lockfile to remove Yarn v3 resolutions, then re-create with Yarn v4? but resolutions lost on devDeps
follow-up attempt here: https://github.com/leotm/react-native-template-new-architecture/pull/846
Raised in
- https://github.com/leotm/react-native-template-new-architecture/issues/1181
 
Followed up in
- https://github.com/leotm/react-native-template-new-architecture/pull/1205