From 0.63 to 0.64: There were changes to the lockfile in deployment mode
Environment
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 60.43 MB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.0/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/eliw00d/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6858069
Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
Languages:
Java: 11.0.4 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Things I’ve done to figure out my issue
- [x] I used upgrade-helper to do my upgrade.
Upgrading version
0.64.0
Description
I was able to upgrade locally without issue but in our CI pipeline I get the following error:
[!] There were changes to the lockfile in deployment mode:
SPEC CHECKSUMS:
FBReactNativeSpec:
New Lockfile: 5f7db3145b0d24825cf4a916bad5193e5b071fd9
Old Lockfile: d102dea40ac1b52fd9a2530cb872c707a3ea1de3
No matter what I do to clear the cache locally it always seems to have a different checksum in CI. I use Jenkins and it should be a fresh workspace for every build since CP_HOME_DIR is set to a folder on the workspace instead of on the machine. Nothing has changed in my pipeline and all previous React Native upgrades have not had this issue.
Reproducible demo
Should be fixed in https://github.com/facebook/react-native/commit/bdfe2a51791046c4e6836576e08655431373ed67 which has been merged but not yet released. Ref: https://github.com/facebook/react-native/issues/31193
TLDR of the root cause: the podspec for FBReactNativeSpec includes full local path (such as /your/machine/your/app/ios/Pods/Local\ Podspecs/FBReactNativeSpec.podspec.json. This means that the checksum is basically different on every single machine.