react-native: [0.60.0] Build failed after upgrading from 0.59.9 to 0.60
Hello, I failed to build my project after upgrading react-native from 0.59.9 to 0.60.0 (iPad iOS app). I tried with react-native CLI and then with XCode and I got these issues, all coming from “jsi” :
error: {PATH}/node_modules/react-native/ReactCommon/jsi/jsi.h: No such file or directory error: {PATH}/node_modules/react-native/ReactCommon/jsi/instrumentation.h: No such file or directory error: {PATH}/node_modules/react-native/ReactCommon/jsi/jsi-inl.h: No such file or directory error: {PATH}/node_modules/react-native/ReactCommon/jsi/JSIDynamic.h: No such file or directory
React Native version: 0.60.0 System: OS: macOS 10.14.5 CPU: (4) x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Memory: 224.88 MB / 8.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 12.1.0 - /usr/local/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.10.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2 IDEs: Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.0 => 0.60.0 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
react-native upgrade
then i got some errors on terminal :error: information de nom de fichier manquante dans l'en-tête de git diff lors de la suppression de 2 composants de préfixe de chemin (ligne 5) error Automatically applying diff failed error Patch failed to apply for unknown reason. Please fall back to manual way of upgrading info You may find these resources helpful: • Release notes: https://github.com/facebook/react-native/releases/tag/v0.60.0 • Comparison between versions: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.9..version/0.60.0 • Git diff: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.9..version/0.60.0.diff error Upgrade failed. Please see the messages above for details. Run CLI with --verbose flag for more details.
- Then I run
npm update
,yarn upgrade
, and thenreact-native upgrade
and i got this :
info No version passed. Fetching latest… info Fetching diff between v0.59.10 and v0.60.0… info Applying diff… warn Excluding files that exist in the template, but not in your project:
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.60.0” and its peer dependencies… info Running “git status” to check what changed… Sur la branche 41-implement-online-grading Votre branche est à jour avec ‘origin/41-implement-online-grading’. Modifications qui seront validées : (utilisez “git reset HEAD <fichier>…” pour désindexer) modifié : package-lock.json modifié : package.json modifié : yarn.lock
Modifications qui ne seront pas validées : (utilisez “git add <fichier>…” pour mettre à jour ce qui sera validé) (utilisez “git checkout – <fichier>…” pour annuler les modifications dans la copie de travail)
modifié : ios/gazecraftclient.xcodeproj/project.xcworkspace/xcuserdata/pierrefournier.xcuserdatad/UserInterfaceState.xcuserstate warn Please run “git diff” to review the conflicts and resolve them info You may find these resources helpful: • Release notes: https://github.com/facebook/react-native/releases/tag/v0.60.0 • Manual Upgrade Helper: https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.0 • Git diff: https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.59.10..0.60.0.diff error Upgrade failed. Please see the messages above for details. Run CLI with --verbose flag for more details.
- Then I commited differences, ‘npm install’ and I tried to build but i got errors
Describe what you expected to happen: Just upgrade from 0.59.9 to 0.60.0 and run my application
Snack, code example, or link to a repository: My pagkage/json :
{ "name": "gazecraftclient", "private": true, "scripts": { "start": "react-native start", "android": "react-native run-android", "ios": "react-native run-ios", "ipad": "ENVFILE=.env.simu-pegase react-native run-ios --simulator \"iPad (5th generation)\"", "ipad-schema": "ENVFILE=.env.simu-schema react-native run-ios --simulator \"iPad (5th generation)\"", "device": "ENVFILE=.env.ipad-pegase react-native run-ios --device \"iPad de Thibault\"", "device-schema": "ENVFILE=.env.ipad-schema react-native run-ios --device \"iPad de Thibault\"", "device-xplane": "ENVFILE=.env.ipad-xplane react-native run-ios --device \"iPad de Thibault\"", "ipad-xplane": "ENVFILE=.env.simu-xplane react-native run-ios --simulator \"iPad (5th generation)\"", "release": "ENVFILE=.env.ipad-xplane react-native run-ios --device \"iPad de Thibault\" --configuration Release" }, "dependencies": { "@babel/runtime": "7.3.4", "@react-native-community/slider": "^1.1.4", "art": "^0.10.3", "d3": "^5.9.7", "d3-shape": "^1.3.5", "npm": "^6.10.0", "react": "16.8.6", "react-native": "0.60.0", "react-native-config": "^0.11.7", "react-native-elements": "^1.1.0", "react-native-pdf": "^5.1.3", "react-native-svg": "^9.5.1", "react-native-vector-icons": "^6.6.0", "react-timer-mixin": "^0.13.4", "rn-fetch-blob": "^0.10.15", "victory-native": "^32.0.2" }, "devDependencies": { "@types/react": "^16.8.23", "@types/react-native": "^0.60.0", "react-native-svg-transformer": "^0.13.0" } }
Thanks in advance for any help 😊
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 18
- Comments: 32
Looks like RN is attempting to get the jsi stuff in the wrong directory. All the stuff it wants is inside
node_modules/react-native/ReactCommon/jsi/jsi/
. I tried moving the contents insidejsi/jsi
intojsi/
but it caused errors all over the place.I am not sure why @DSegal92 comment didn’t get enough attention but for some reason, Open your project on xcode, do
Shift + alt + command ⌘ + K
and re-build using xcode.This will clean your project and might solve your issue
This issue is persisting for me on 0.60.3. I can build successfully on XCode but not with
react-native run-ios
like @NuclearKev . None of the above suggestions have helped. Has anyone found another solution?Cleaning up ios’s build folder using
rm -rf ios/build
and removing all libraries exceptlibPod-[project-name].a
in the “Link Binary With Libraries” did the trick to me 😃Yeah, I’ve got one package that has the
rnpm
warning as well. So, that shouldn’t be the issue. Yes, yourLink Binary With Libraries
is correct, as far as I can tell. The only thing I can think of is that theproject.pbxproj
still has some stuff that shouldn’t be there or maybe another file that still has old stuff in it. Try looking at https://react-native-community.github.io/upgrade-helper/. Also, maybe try removing the build data fromDerviedData/
.Thank you all. Now the “react-native run-ios” is performing successfully. But now I am facing an issue on app console:
$RefreshReg$ is not defined
I have no idea whats is happening.
@alivevietnam did you tried the steps that i suggested?