Closed br-dev closed 4 years ago
cc @thymikee for cli, @lucasbento for upgrade command
I haven't seen this error yet. Can you share your repository structure, maybe a repro (without js/business files irrelevant for upgrade) we could download?
I ran into the same issue. This is what I did to get my app to build.
yarn remove react-native
yarn add react-native
Confirmed that I was on 0.62.
Went to ios and ran
pod deintegrate && pod install --repo-update
Got the following error:
[!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
In snapshot (Podfile.lock):
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
In Podfile:
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
None of your spec sources contain a spec satisfying the dependency: `ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
I changed the podfile from:
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
to
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
Reran the same pod command and it completed without error. Ran run-ios and all is good in simulator so far. Flipper connected and rendered information.
@spdaly This issue is about "git diff header lacks filename information when removing 2 leading pathname components". I highly doubt this is your problem.
The message "git apply failed" is unfortunately pretty common and there's not much we can do about it at the moment, because of the way how diffs are generated (diff patches are applied from a reference app – RNDiffApp – to a slightly different app – your own – that may have stuff shifted around, hence git failures). That's why we tell users what exactly we failed and provide links to manual Upgrade Helper.
@spdaly This issue is about "git diff header lacks filename information when removing 2 leading pathname components". I highly doubt this is your problem.
The message "git apply failed" is unfortunately pretty common and there's not much we can do about it at the moment, because of the way how diffs are generated (diff patches are applied from a reference app – RNDiffApp – to a slightly different app – your own – that may have stuff shifted around, hence git failures). That's why we tell users what exactly we failed and provide links to manual Upgrade Helper.
OK. I think I can try and do it manually. Is this really now just a copy/paste exercise using this:
https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.0
or is there some additional trick I'm missing?
Yup, it's mostly copy/pasting, plus following this note, especially around Xcode:
Alright, thanks for the info. I'll try this out manually.
Environment
Ran this after running the failed upgrade command...
info Fetching system and libraries information... System: OS: macOS 10.15.4 CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz Memory: 1.69 GB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 11.4/11E146 - /usr/bin/xcodebuild Languages: Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.0 => 0.62.0 npmGlobalPackages: react-native: Not Found
Upgrading version
0.62.0
Description
I'm getting an error:
debug "git apply" failed. Error output: error: git diff header lacks filename information when removing 2 leading pathname components (line 6)
Full text below:
$ npx react-native upgrade --verbose info No version passed. Fetching latest... info Fetching diff between v0.61.5 and v0.62.0... info Applying diff... warn Excluding files that exist in the template, but not in your project:
debug "git apply" failed. Error output: error: git diff header lacks filename information when removing 2 leading pathname components (line 6)
error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually info Installing "react-native@0.62.0" and its peer dependencies... yarn add v1.22.4 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Saved lockfile. success Saved 18 new dependencies. info Direct dependencies ├─ react-native@0.62.0 └─ react@16.11.0 info All dependencies ├─ @react-native-community/cli-debugger-ui@4.2.1 ├─ @react-native-community/cli-platform-android@4.4.0 ├─ @react-native-community/cli-platform-ios@4.4.0 ├─ @react-native-community/cli-types@4.4.0 ├─ @react-native-community/cli@4.4.0 ├─ anser@1.4.9 ├─ eslint-plugin-relay@1.4.1 ├─ hermes-engine@0.4.0 ├─ metro-config@0.58.0 ├─ metro-inspector-proxy@0.58.0 ├─ metro-minify-uglify@0.58.0 ├─ metro-react-native-babel-transformer@0.58.0 ├─ metro@0.58.0 ├─ ob1@0.58.0 ├─ react-devtools-core@4.6.0 ├─ react-native@0.62.0 ├─ react@16.11.0 └─ scheduler@0.17.0 ✨ Done in 20.85s. info Running "git status" to check what changed... On branch hasura Your branch is up to date with 'origin/hasura'.
Changes to be committed: (use "git restore --staged..." to unstage)
modified: package.json
modified: yarn.lock
warn Please run "git diff" to review the conflicts and resolve them warn After resolving conflicts don't forget to run "pod install" inside "ios" directory info You may find these resources helpful: • Release notes: https://github.com/facebook/react-native/releases/tag/v0.62.0 • Manual Upgrade Helper: https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.0 • Git diff: https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.61.5..0.62.0.diff error Upgrade failed. Please see the messages above for details
Reproducible demo
This is on a private repo, no reproducible demo.