-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Reliable build on ^0.39.2
fails when upgrading to ^0.40.0
#11721
Comments
IIRC, there are a couple pretty major breaking changes in 0.40. It's probably best to wait for change notes. |
Take a look on the release note: https://github.com/facebook/react-native/releases/tag/v0.40.0 I recommend to use this tool: https://github.com/ncuillery/rn-diff |
I solved it doing this:
BTW, I am using https://github.com/beefe/react-native-picker and it also works without updating the import format in the library. Strange, but it is working... |
I have encounter same issue after upgrade from 0.39.2 to 0.40, but @SandroMachado 's workaround not work for me. |
how is disabling parallelization a good thing? isnt the packager slow enough, now we slow down xcode too? why? i really dont think this should be turned off. this change happened here e1577df |
·react-native upgrade ·react-native-git-upgrade 还可以参考这篇讨论:facebook/react-native#11721 ===================================我是分割线================================= Ijkplayer扔到项目中各种头文件找不到,集成待解决。 下次更新不知道什么时候了……
Hi! I unchecked the parallelize build option, added React as a target to project's scheme, placed above other targets and it still says "<React/RCTLog.h> file not found". Although every third party dependency is converted to the new imports. By the way, I'm using CocoaPods to include react-native in my project. May it cause the problem? The contents of my Podfile:
It used to work before I upgraded to 0.40. |
I went thru ncuillery/rn-diff@rn-0.39.2...rn-0.40.0 and moved over what seemed to be meaningful, but not what I assume to be compile results. My remaining issues may be specific to my project, but also likely affect others. Does anyone know how to solve these? |
Same for me. Release scheme stops working in every app, that worked before.
|
@patrickhaug I ran into that same issue with release schemes failing to build, I read in a different issue tracker and can confirm that deleting your release scheme and re-creating it again in Xcode will get you past that problem |
@joncursi that seems to fix it! thank you sir! |
@luhui Maybe you have installed RN 0.40.0 before running the |
+1 @SandroMachado's solution. It worked for me. Thank you! @binchik I have the same problem and #2685 fix my issue:
|
@yoniji Thanks for the suggestion. I tried it, Xcode still can't find React libs. I stopped using CocoaPods, imported everything the usual way, now everything works fine. I'd like to use CocoaPods though :-( |
@rops Do the 3rd party libs' podspecs explicitly depend on |
(cont above) Most of 3rd party libs don't have podspecs. They are usually distributed only as an XCode proj. To add those, I just
( which is the same steps that If I manually override the HEADER_SEARCH_PATH in SomeLibrary.xcodeproj and make it point to MyProject/Pods/Headers/Public then it builds fine. Is there maybe a way to include SomeLibrary in my Podfile even if there is no SomeLibrary.podspec? Or maybe just some XCode settings to propagate MyProject HEADER_SEARCH_PATH to its children projects? |
@rops I’m getting confused. Is your issue really the same issue that this ticket was originally about? With regards to your specific issue, there’s not much I can help you with. You can either create local podspecs for the libraries you’re using and have CP integrate them for you, or you’ll have to keep doing what you’re doing (adding the header search paths) which you can maybe try to automate. |
Circling back to this to try again. I believe the #11721 (comment) has moved resolution forward, but still seeing a blocking error. Anybody know how to address bringing other deps/libs along with the upgrade? ** BUILD FAILED **
The following build commands failed:
CompileC <FULLPATH>/project/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKShareButtonManager.o RCTFBSDK/share/RCTFBSDKShareButtonManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/project.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/project.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
error Command failed with exit code 1. |
Additionally, if I run ./node_modules/.bin/react-native-git-upgrade
<FULLPATH>/project/node_modules/react-native-git-upgrade/cliEntry.js:9
'use strict';var checkForUpdates=function(){var _ref=_asyncToGenerator(regeneratorRuntime.mark(
^
ReferenceError: regeneratorRuntime is not defined
at <FULLPATH>/project/node_modules/react-native-git-upgrade/cliEntry.js:9:72
at Object.<anonymous> (<FULLPATH>/project/node_modules/react-native-git-upgrade/cliEntry.js:205:208)
at Module._compile (module.js:571:32)
at loader (<FULLPATH>/project/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (<FULLPATH>/project/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19) |
From e1577df description:
Can somebody explain why it says "you may need"? Does it work for somebody without doing this? Why? |
The underlying issue is that the sub-projects like RCTVibration, RCTWebSocket, etc all depend on things in the React project, but do not have it as a build dependency, so it is possible for them to try to build before the things they depend on have built. I actually found that if you make the React project a dependency of all the other RCT* sub-projects, you can turn parallel builds back on and it works fine. To add the React project as a dependency, do the following:
If somebody could go through these steps and verify it solves the issue for them AND allows them to turn parallel builds back on, that would be greatly appreciated. Once I verify that this works for other people's projects, I would be fine with making a PR against React Native to make this happen by default. |
@steveccable I can confirm your steps worked in my case. I went from RN 0.36 to 0.41 and resolved the dependency issues following your steps. Thanks for posting that. It was tedious, but it worked. |
@steveccable please keep us posted if you do create a PR. |
I just did a fresh project with the new version and ported over all the code. None of the above worked for me. |
Closing, because it looks like #11721 (comment) is solving for most folks. |
@kirkstrobeck you see warning??? |
@tanguyantoine would you please open a new issue and reference this one? |
@kirkstrobeck I think you can :) |
^ ha! oops, I meant to mention @tanmynguyen -- autocomplete ftw |
xcode facebook/react-native#11721 (comment) react-native upgrade oblador/react-native-vector-icons#373 (comment) update react-native-config and `react-native link react-native-config` lugg/react-native-config#72
If
My newly created project from react-native 0.46.3 was red :S I have npm 5.3.0 and yarn 0.24.5 when I did react-native init |
Hi @kirkstrobeck @tanguyantoine @steveccable @SandroMachado @joncursi I tried to upgrade the React-native 0.39.0 to 0.50.0 and React 15.3.1 to 16.0.0 facing errors in Xcode could you guys please help me |
do you mean @tanmynguyen ? |
@tanmynguyen Actually i saw the comments above and typed the names.If you know the solution for above comment.Could you please suggest the solution |
@GopiKrishna10 as mentioned at #11721 (comment), I could not resolve this. Hope you have better luck 👍 |
Ok @kirkstrobeck Thanks. |
The text was updated successfully, but these errors were encountered: