Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.60.0] Build failed after upgrading from 0.59.9 to 0.60 #25572

Closed
peiofour opened this issue Jul 10, 2019 · 32 comments
Closed

[0.60.0] Build failed after upgrading from 0.59.9 to 0.60 #25572

peiofour opened this issue Jul 10, 2019 · 32 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@peiofour
Copy link

peiofour commented Jul 10, 2019

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(R) Core(TM) 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

  1. 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.
  2. Then I run npm update, yarn upgrade, and then react-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 ..." pour désindexer)
modifié : package-lock.json
modifié : package.json
modifié : yarn.lock

Modifications qui ne seront pas validées :
(utilisez "git add ..." pour mettre à jour ce qui sera validé)
(utilisez "git checkout -- ..." 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.

  1. 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 😊

@peiofour peiofour added the Bug label Jul 10, 2019
@rokebrand
Copy link

Exact same issue here

@DSegal92
Copy link

I ran into this issue, after clearing derived data (Shift + alt + command ⌘ + K) was able to build successfully

@NuclearKev
Copy link

I'm having the same errors when I run react-native run-ios.

@DSegal92 I attempted your solution, but it didn't help

@NuclearKev
Copy link

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 inside jsi/jsi into jsi/ but it caused errors all over the place.

@pabloimmediate
Copy link

Same issue here! :(

@NuclearKev
Copy link

I got it working by making sure that my project.pbxproj file was updated to what it should be for 0.60.x. Then I had to add the correct Podfile and run cd ios/ && pod install. Fixed a few minor issues and now I'm good to go!

@irohitb
Copy link

irohitb commented Jul 18, 2019

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

@pkpbynum
Copy link

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?

@NuclearKev
Copy link

@pkpbynum what is the error? Same as before with jsi?

@pkpbynum
Copy link

@NuclearKev Yes, the exact same files and everything.

@NuclearKev
Copy link

Did you unlink everything from your iOS build and rely on cocoapods solely?

@pkpbynum
Copy link

Yes, I've unlinked everything as far as I can tell. XCode shows the following, which appears on running pod install, so I assume that is right?
image

I'm also getting 2 warnings for packages which are still using the rnpm configuration:
`warn The following packages use deprecated "rnpm" config that will stop working from next release:

@NuclearKev
Copy link

Yeah, I've got one package that has the rnpm warning as well. So, that shouldn't be the issue. Yes, your Link Binary With Libraries is correct, as far as I can tell. The only thing I can think of is that the project.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 from DerviedData/.

@rafaismyname
Copy link

Cleaning up ios's build folder using rm -rf ios/build and removing all libraries except libPod-[project-name].a in the "Link Binary With Libraries" did the trick to me :)

@alive-vietnam-ti
Copy link

The same issue
Anybody help, please?

@rafaismyname
Copy link

Cleaning up ios's build folder using rm -rf ios/build and removing all libraries except libPod-[project-name].a in the "Link Binary With Libraries" did the trick to me :)

@alivevietnam did you tried the steps that i suggested?

@leandrolimasi
Copy link

Same issue here. I tried all the options suggested by you guys.

When I try to run "pod install", I got this error: No `Podfile' found in the project directory.
And @rafaismyname sorry by my dummy, but where can I find "Link Binary With Libraries" to remove libraries?

@NuclearKev
Copy link

@leandrolimasi you need to add a Podfile. Use https://react-native-community.github.io/upgrade-helper/ to help you.

@rafaismyname
Copy link

Same issue here. I tried all the options suggested by you guys.

When I try to run "pod install", I got this error: No `Podfile' found in the project directory.
And @rafaismyname sorry by my dummy, but where can I find "Link Binary With Libraries" to remove libraries?

@leandrolimasi Open Xcode, select your target, it's right under Build Phases

@leandrolimasi
Copy link

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.

@josemigallas
Copy link

josemigallas commented Aug 4, 2019

In my case I think it was a problem with the .pbxproj file. I unlinked all packages, removed all libraries and installed pods like it says in this GH issue.

@patrice4github
Copy link

The missing files jsi/jsi.h (and others) were downloaded in the jsi/jsi/ directory. I copied them all in the jsi directory (from jsi/jsi) to workaround this issue.

@rynpatk
Copy link

rynpatk commented Aug 12, 2019

I had my .xcodeproj file opened in Xcode and needed to switch to the .xcworkspace file.

@ShengkunZhang
Copy link

yarn install or yarn install --ignore-engines
Do not use npm install,it's ok

@massisc
Copy link

massisc commented Sep 9, 2019

to anyone who's facing this issue yet.

at keast in my case. the problem was related to react-navigation, that moved createStackNavigator and createDrawerNavigator to new separated packages.

After installing "react-navigation-stack" and "react-navigation-drawer" the project started to work again.

@luisorduz
Copy link

resolvi este problema llendo a la ruta ⁨node_modules⁩/⁨react-native⁩/⁨ReactCommon⁩/jsi⁩/jsi y luego copiando copiando todos los archivos aqui node_modules⁩/⁨react-native⁩/⁨ReactCommon⁩/jsi
Screen Shot 2019-09-27 at 3 50 35 PM

@adamfellon
Copy link

Hi @rafaismyname i'm in the process of his upgrade except from 0.57.8 to 0.61.2 . When looking around for my libPods-[project-name] I was unable to find it.

I was previously using Pods in my project as well and didn't have this in the linked libraries list. Do you know why I don't have it and where I can add it?

I'm currently running into import issues in React core and I think it's related

@rafaismyname
Copy link

Hi @rafaismyname i'm in the process of his upgrade except from 0.57.8 to 0.61.2 . When looking around for my libPods-[project-name] I was unable to find it.

I was previously using Pods in my project as well and didn't have this in the linked libraries list. Do you know why I don't have it and where I can add it?

I'm currently running into import issues in React core and I think it's related

Hey @adamfellon, how's going?

Sorry, but i have no clue on that!
I suggest you read the RN Update Helper for this: https://react-native-community.github.io/upgrade-helper/?from=0.57.8&to=0.61.2

Best luck

@adamfellon
Copy link

it's going...day 3 of trying to get the app to build so there have been better days.

I realized this libPods-[project-name] comes into the .xcodeworkspace if you remove use_frameworks! from your Podfile.

So I have that present...still running into header import issues from Folly just trying to import strings.h though :\

Thanks for the reply!

@DungBuiDeveloper
Copy link

any solution for isssue

@stale
Copy link

stale bot commented Mar 9, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 9, 2020
@stale
Copy link

stale bot commented Mar 16, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Mar 16, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests