react-native-community / releases

React Native releases
https://github.com/facebook/react-native/
1.5k stars 407 forks source link

Road to v0.64 Discussion #214

Closed grabbou closed 3 years ago

grabbou commented 3 years ago

Current latest release: v0.64.0-rc.4

Highlighted Changes

Please see the changelog PR for more details.

Work Required

Already resolved - [X] [Update documentation](https://github.com/facebook/react-native-website/projects/1) [@simek] - [x] facebook/react-native#29914 - [x] React 17 support (landed) - [x] facebook/react-native#29882 - [x] facebook/react-native#30177 - [x] facebook/react-native@a7c1c5a - [x] Bump CLI to latest - [x] Migrate warnings in index.js to point to new lean core repos (https://github.com/facebook/react-native/pull/30422) - [x] The `hermes-engine` pod has no version constraints specified, which should probably happen in the `React-Core.podspec` file and lock it with similar version constraints as the one applied to the Android version in `package.json`. Fixed by https://github.com/facebook/react-native/pull/30432 - [x] The newly introduced codegen invocation step in the iOS Podfile is failing, as the dependencies of the `react-native-codegen` package have not been installed. See output [here](https://gist.github.com/alloy/2d3b3285b76666234be62086f9d4b8b6). In progress PR here https://github.com/facebook/react-native/pull/30449 - [x] Trying to build a newly created Android app fails when checking the dynamic libraries for duplicate classes. See output [here](https://gist.github.com/alloy/a9f2f4102705bad0b2c53407edd2bd89). Fixed by https://github.com/facebook/react-native/pull/30452 - [x] https://github.com/facebook/react-native/pull/30470 - [x] The new CLI has a minor regression when using a local template dir, now you need to specify the `file://` protocol to resolve that [@grabbou] (added note to changelog, this is expected) - [x] https://github.com/facebook/react-native/commit/d85d5d2e1974b463318e4c86da29a5ccdd60a977 - [x] facebook/react-native#30489 (+ make sure to update the changelog as [per this comment](https://github.com/facebook/react-native/pull/30489#pullrequestreview-539864503)) - [x] Bump to Hermes 0.7.2 (facebook/hermes#373) (https://github.com/facebook/react-native/pull/30561) - [x] Add instructions on how to enable Hermes in the default application https://github.com/facebook/react-native/pull/30461 - [x] Running `pod install` outside of `ios` folder will fail facebook/react-native#30469 (temporary solution, will be fixed by facebook/react-native#30449) - cherry picked https://github.com/facebook/react-native/commit/c901c1fbce080c6e9b6ed56dbccaa7f2fa0571b2, https://github.com/facebook/react-native/commit/5eee2f2bc01184481a663453648ab15d1d295f4d and https://github.com/facebook/react-native/commit/b61aaa1545b3308bda5ade169204f875ba417f01 for the record. - [x] ~~Submitting Hermes enabled application to AppStore will fail validation https://github.com/facebook/hermes/issues/420~~ This isn't a release blocker; this issue is triggered when somebody specifies a higher deployment target than the default and can be solved by the user as shown [here](https://github.com/facebook/hermes/issues/420#issuecomment-736875843). - [x] https://github.com/facebook/react-native/pull/30571 - [x] Building React Native application in release mode will cause an issue with Xcode 12 facebook/react-native#29984 (here [is a workaround](https://github.com/facebook/react-native/issues/29984#issuecomment-696328815)) https://github.com/facebook/react-native/pull/30543 - [x] facebook/react-native#30495 (regression) - [x] Building with Hermes in Release mode (or with "build active architecture" set to false) causes "Thread-local storage is not supported for the current target" in "folly/synchronization/Rcu.cpp:17:10:" and happens while building for "i386". https://github.com/facebook/react-native/pull/30592 - [x] Resolve issues highlighted in the comment https://github.com/react-native-community/releases/issues/214#issuecomment-758203239 - [x] https://github.com/facebook/react-native/commit/811ccec74e5b898e9304f86f85f390908f8d317f - [x] https://github.com/facebook/react-native/commit/7a9e4ba4e9ae02ab8a0fe0f67ceefd5d675b9dbf - [x] https://github.com/facebook/react-native/commit/f312e5ba84afcddaac326ed62eaf4e00c00cf480 - [x] https://github.com/facebook/react-native/commit/f45cb60e560d21be134aa808bd105e0394ba1fd5 - [x] Issue stripping symbols on Android https://github.com/react-native-community/releases/issues/214#issuecomment-758425571 - [x] Some users are experiencing issues with CodeGen on iOS due to missing files https://github.com/react-native-community/releases/issues/214#issuecomment-766436299

Hopeful Dates

We can never commit to the dates involved in a release as many things are out of our control. However, we are thinking about these rough dates for this release.

owinter86 commented 3 years ago

I have found an issue with the latest RC when using <KeyboardAvoidingView behaviour='height'/> on a scrollview the app will freeze when focussing on a TextInput, can confirm this works on the latest stable RN release and the bug introduced in 64.

https://github.com/facebook/react-native/issues/30495

kelset commented 3 years ago

@lorenzoangelini @rpavlovs sounds like the two of you should open an issue on the lottie repo and help the maintainer over there pinpoint the issue and fix it ;) Feel feel to link the issue here once it's open so that other people can find it easily.

NickGerleman commented 3 years ago

Would appreciate it if we could cherry pick in https://github.com/facebook/react-native/commit/6d2a5279841886a9a14f82057202bf8950c3f917

The commit fixes an issue on iOS/macOS/Windows where clicks or taps are sometimes eaten when using a physical keyboard instead of soft keyboard. Full disclosure that a previous version of the commit was reverted, so there's a little bit of risk of followup. This one has stuck for a few weeks though.

DicksonChi commented 3 years ago

Not sure if this comment will make a difference as I understand why you want to remove support for the older versions of Android.

We develop apps for emerging markets. In some countries in Africa, we still have thousands of users in Android 4.4 (around 4% of the user base in some apps). If you remove support for older SDK, we and everyone else developing for emerging markets won't be able to upgrade and will be stuck in 0.63 for the foreseeable future.

For reference, here's the penetration for Africa: https://gs.statcounter.com/android-version-market-share/mobile-tablet/africa

Edit: I propose RN keeps support for SDK >= 4.4, I think it's a good balance between supporting devices in emerging markets and removing old APIs

I strongly agree with this.

owinter86 commented 3 years ago

Any reason why this was marked as resolved?

I have found an issue with the latest RC when using <KeyboardAvoidingView behaviour='height'/> on a scrollview the app will freeze when focussing on a TextInput, can confirm this works on the latest stable RN release and the bug introduced in 64.

https://github.com/facebook/react-native/issues/30495

grabbou commented 3 years ago

For issues with building iOS in Release mode, please check this workaround. It is a known issue and we're working on it.

grabbou commented 3 years ago

@owinter86 this was added to the original issue as "TODO" for the release, and as a result, the comment itself was minimised to keep the issue a bit cleaner. There's a few ongoing threads here, trying to make it a bit cleaner.

grabbou commented 3 years ago

@lfrodrigues, appreciate your message and rising this topic. I would recommend opening an issue in React Native repository directly or in Discussions and Proposals where such call can be made. Here, we're just working on the release itself.

grabbou commented 3 years ago

No error in building on real device or simulator on IOS or Android i successfully migrate the 0.63.3 to 0.64.0-rc.1 (with Hermes also) but when i want to do an Archive on any device (arm64) to publish on Testflight i got this error :

File /Users/Polyrion/Library/Developer/Xcode/DerivedData/greenapp-esyrbbmdczgfjnajidahxcpqtjox/Build/Intermediates.noindex/ArchiveIntermediates/greenapp/BuildProductsPath/Release-iphoneos/GreenApp.app/main.jsbundle does not exist. This must be a bug with'
error: File /Users/Polyrion/Library/Developer/Xcode/DerivedData/greenapp-esyrbbmdczgfjnajidahxcpqtjox/Build/Intermediates.noindex/ArchiveIntermediates/greenapp/BuildProductsPath/Release-iphoneos/GreenApp.app/main.jsbundle does not exist. This must be a bug with
+ echo 'React Native, please report it here: https://github.com/facebook/react-native/issues'

@Polyrion, what is your directory structure? I wasn't able to reproduce this. What does your "Bundle React Native code and images" looks like? I suspect there might be something going on there.

Please go to Xcode, look into the build log and locate the error (should be "Bundle React Native code and images" phase that failed). Please copy all its content and paste it here, we will be able to investigate what went wrong.

Here is a screenshot that shows an example build log from my Release build that I just run:

Screenshot 2020-12-01 at 16 54 13 Screenshot 2020-12-01 at 16 53 44 Screenshot 2020-12-01 at 16 54 02

As you can see from the above images, building finished w/o issues.

grabbou commented 3 years ago

@ReactNativ please tell us a bit more about your app, what dependencies? blank app or you have upgraded? did you manage to locate the error?

ReactNativ commented 3 years ago

I had installed the V0.64.0-rc.0 version, and the app was crashed, but it is ok with V0.64.0-rc.1 version. Thanks

aung-ko commented 3 years ago

Not sure if this comment will make a difference as I understand why you want to remove support for the older versions of Android.

We develop apps for emerging markets. In some countries in Africa, we still have thousands of users in Android 4.4 (around 4% of the user base in some apps). If you remove support for older SDK, we and everyone else developing for emerging markets won't be able to upgrade and will be stuck in 0.63 for the foreseeable future.

For reference, here's the penetration for Africa: https://gs.statcounter.com/android-version-market-share/mobile-tablet/africa

Edit: I propose RN keeps support for SDK >= 4.4, I think it's a good balance between supporting devices in emerging markets and removing old APIs

Agree with this one. A lot people in SEA countries still using old phones with Android 4.4.

yeyintkoko commented 3 years ago

Sorry if this is just noise, but when I have had "android total failure to find/load DSO" issues like that, it was of course immediately down to the soloader. You can maybe try downgrading it (it was upgraded for RN64 yes?) sort of like so: https://github.com/invertase/react-native-firebase/blob/bda2d67ddaf7f12ac3143b564e7e94974e8356db/tests/android/app/build.gradle#L118-L123

(that was me solving this problem by upgrading it from a lower version to the one that went in RN63, perhaps a quick test hacking that in from someone reproducing this currently might help isolate things

I can confirm "android failure to load DSO" issue still remain in RN63. Firebase crashlytics keep reporting many crashes for DSO load fail on my projects with RN0.63.2.

yeyintkoko commented 3 years ago

Not sure if this comment will make a difference as I understand why you want to remove support for the older versions of Android.

We develop apps for emerging markets. In some countries in Africa, we still have thousands of users in Android 4.4 (around 4% of the user base in some apps). If you remove support for older SDK, we and everyone else developing for emerging markets won't be able to upgrade and will be stuck in 0.63 for the foreseeable future.

For reference, here's the penetration for Africa: https://gs.statcounter.com/android-version-market-share/mobile-tablet/africa

Edit: I propose RN keeps support for SDK >= 4.4, I think it's a good balance between supporting devices in emerging markets and removing old APIs

I agree with this.

grabbou commented 3 years ago

I can confirm "android failure to load DSO" issue still remain in RN63. Firebase crashlytics keep reporting many crashes for DSO load fail on my projects with RN0.63.2.

@yeyintkoko do I understand right that the issue happens on RN63 too? I am confused whether this is regression, or just a general issue that keeps happening anyway.

If the answer is "yes", I would recommend opening an issue in React Native repository instead.

kelset commented 3 years ago

codegen fix landed: https://github.com/facebook/react-native/commit/c901c1fbce080c6e9b6ed56dbccaa7f2fa0571b2

kelset commented 3 years ago

@alloy @grabbou we should also make sure that we get Hermes 0.7.3 out & version bumped so that 0.64.0 depends on it. (Currently it's not out yet, see https://github.com/facebook/hermes/issues/373)

thymikee commented 3 years ago

Template dev deps bump just got merged, requesting cherry-pick: https://github.com/facebook/react-native/commit/652e3953f48938580e1bf8ea1ba70105997e59d2

romanonthego commented 3 years ago

@alloy @grabbou we should also make sure that we get Hermes 0.7.3 out & version bumped so that 0.64.0 depends on it. (Currently it's not out yet, see facebook/hermes#373)

https://github.com/facebook/hermes/releases/tag/v0.7.2 https://github.com/facebook/hermes/issues/373#issuecomment-741686224

0.7.2 has been released

Huxpro commented 3 years ago

Hey folks, Hermes 0.7.2 is out and https://github.com/facebook/react-native/pull/30561 will bump the pod version.

Note: in case you are confused, we just fast forward everything so there is no need for another 0.7.3 😅

McAJBen commented 3 years ago

There seems to be an issue with KeyboardAvoidingView caused by https://github.com/facebook/react-native/commit/b08fff6f869e00c20c0dcdf7aca71284c2f276f0 in 0.64.0-rc.1. https://github.com/facebook/react-native/issues/30495 https://github.com/facebook/react-native/issues/30532

This change causes the KeyboardAvoidingView to re-render as fast as it can. Also if keyboardVerticalOffset props is passed the size will change every other render causing the screen to flash.

dulmandakh commented 3 years ago

please cherry pick https://github.com/facebook/react-native/commit/a4d8632890df43c40ee3f892dc2817238de143db, it'll reduce NPM package size

rosskhanas commented 3 years ago

Can https://github.com/facebook/react-native/pull/29683 and https://github.com/facebook/react-native/pull/29728 be included in the release?

ziyoshams commented 3 years ago

I think this release can be pushed for next year. I don’t see it landing anytime soon.

qqakashi commented 3 years ago

Is the underlying refactoring of react native finished? In version 0.65?

kelset commented 3 years ago

@rosskhanas in the previous issue around 0.64 @TheSavior mentioned this:

Re: facebook/react-native#29728 for PlatformColor support for border colors. Reading the PR it looks like this only adds support for iOS and not for Android. If that's the case, we probably won't merge it in or prioritize it for 0.64.

So I wouldn't expect those PRs to be prioritized (merged & cherry picked) for 0.64, sorry.

I think this release can be pushed for next year. I don’t see it landing anytime soon.

I guess we'll find out this week what will happen with 0.64.0; there are still quite a few to-do points left in the top comment. As soon as a decision is made we'll report back here.

Is the underlying refactoring of react native finished? In version 0.65?

The re-architecture is currently still ongoing, as far as I know. I wouldn't expect it to be done any time soon (but I don't know if the folks from FB want to share some timelines), so surely not for 0.65. To stay up to date with that, I would recommend keeping your eyes on the pinned issues on the D&P repo.

kelset commented 3 years ago

@dulmandakh would the changes in that commit need to be mirrored in the /template that get used when react-native init is run?

dulmandakh commented 3 years ago

@dulmandakh would the changes in that commit need to be mirrored in the /template that get used when react-native init is run?

nope, it will affect only React Native Android build.

grabbou commented 3 years ago

I guess we'll find out this week what will happen with 0.64.0;

Yes, but the RC work is going to happen regardless and I would see another release candidate being pushed at some point this week with the remaining fixes.

brunolemos commented 3 years ago

already using it in prod since last week fwiw, so far so good (without hermes enabled)

grabbou commented 3 years ago

Except for https://github.com/facebook/react-native/issues/30495 regression, everything else seems to be resolved and cherry-picked. I am going to follow-up with another release candidate today.

grabbou commented 3 years ago

I have just finished testing iOS application on 0.64-branch - I didn't test Android because all commits were iOS related and there was no change for Android.

Other 3 commits were: (2) chore/docs, (1) typo to previous commit.

grabbou commented 3 years ago

We are waiting for https://github.com/facebook/react-native/pull/30592 before we ship. It will land most likely around the same time that the regression I mentioned earlier is resolved.

That said, these two commits should give us an 0.64.0-rc.2 and if everything goes well, we have our stable version 🥇

TheSavior commented 3 years ago

We are waiting for facebook/react-native#30592 before we ship. It will land most likely around the same time that the regression I mentioned earlier is resolved.

That said, these two commits should give us an 0.64.0-rc.2 and if everything goes well, we have our stable version 🥇

Both changes have landed

https://github.com/facebook/react-native/commit/42dde12aac81208c4e69da991f4e08b9e62d18f6 https://github.com/facebook/react-native/commit/67309277fe588c4dd64fe0c680d1d00d2f3fb2b6

grabbou commented 3 years ago

Both changes have landed

facebook/react-native@42dde12 facebook/react-native@6730927

Thank you! I have already cherry-picked them. Happy to say that everything for this release is finally resolved! We're ready to release a new release candidate.

rosskhanas commented 3 years ago

@rosskhanas in the previous issue around 0.64 @TheSavior mentioned this:

Re: facebook/react-native#29728 for PlatformColor support for border colors. Reading the PR it looks like this only adds support for iOS and not for Android. If that's the case, we probably won't merge it in or prioritize it for 0.64.

So I wouldn't expect those PRs to be prioritized (merged & cherry picked) for 0.64, sorry.

I think this release can be pushed for next year. I don’t see it landing anytime soon.

I guess we'll find out this week what will happen with 0.64.0; there are still quite a few to-do points left in the top comment. As soon as a decision is made we'll report back here.

Is the underlying refactoring of react native finished? In version 0.65?

The re-architecture is currently still ongoing, as far as I know. I wouldn't expect it to be done any time soon (but I don't know if the folks from FB want to share some timelines), so surely not for 0.65. To stay up to date with that, I would recommend keeping your eyes on the pinned issues on the D&P repo.

How about https://github.com/facebook/react-native/pull/29683? Is there any reason not merging that PR and including into v0.64? The same functionality is already supported on Android.

a-eid commented 3 years ago

@rosskhanas unfortunately the aim of this issue / repo is not to discuss why and why a certain PR is not getting merged, but to cherry pick PRs that have already been merged.

feel free to comment on those PRs to ask these kind of questions .

rosskhanas commented 3 years ago

@rosskhanas unfortunately the aim of this issue / repo is not to discuss why and why a certain PR is not getting merged, but to cherry pick PRs that have already been merged.

feel free to comment on those PRs to ask these kind of questions .

Sorry, just want to clarify, the aim of my comment is not to discuss why certain PR is not getting merged, but to ask if it can be included in v0.64. Thank you for understanding.

NickGerleman commented 3 years ago

Would appreciate it if we could cherry pick in facebook/react-native@6d2a527

The commit fixes an issue on iOS/macOS/Windows where clicks or taps are sometimes eaten when using a physical keyboard instead of soft keyboard.

I think this one might have gotten lost.

grabbou commented 3 years ago

Answering your message @rosskhanas, we usually merge only critical fixes and commits that are blocking the release. It is hard to choose what gets into the release and what does not, but we always try to avoid cherry-picking features unless absolutely necessary.

grabbou commented 3 years ago

Would appreciate it if we could cherry pick in facebook/react-native@6d2a527 The commit fixes an issue on iOS/macOS/Windows where clicks or taps are sometimes eaten when using a physical keyboard instead of soft keyboard.

I think this one might have gotten lost.

@NickGerleman I will check it tomorrow and let you know.

grabbou commented 3 years ago

Just an update: React Native 0.64.0-rc.2 will be out in ~15 minutes.

gilbertl commented 3 years ago

Tried to update to 0.64.0-rc.2 just now. Getting the following error when I run

$ react-native start --reset-cache error Cannot read property 'dependencyExtractor' of undefined. TypeError: Cannot read property 'dependencyExtractor' of undefined at /Users/gilbertleung/Projects/shuffle/packages/reactnative/node_modules/metro-config/src/loadConfig.js:269:42 at Array.reduce (<anonymous>) at mergeConfig (/Users/gilbertleung/Projects/shuffle/packages/reactnative/node_modules/metro-config/src/loadConfig.js:246:18) at Object.<anonymous> (/Users/gilbertleung/Projects/shuffle/packages/reactnative/metro.config.js:15:18) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:903:19) at require (internal/modules/cjs/helpers.js:74:18)

tido64 commented 3 years ago

@gilbertl Can you post your metro.config.js and installed Metro version? I gave rc.2 a spin and it works fine with my configuration.

gilbertl commented 3 years ago

Hi, I have this error when trying to pod install after upgrading to RC2

[!] An error occurred while processing the pre-install hook of the Podfile.

undefined method `codegen_pre_install' for #<Pod::Podfile:0x00007f86699b28e0>

/Users/admin/Documents/git/gd/sales-boosting-rn/ios/Podfile:17:in `block (3 levels) in from_ruby'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-core-1.10.0.rc.1/lib/cocoapods-core/podfile.rb:162:in `pre_install!'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:869:in `run_podfile_pre_install_hook'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:857:in `block in run_podfile_pre_install_hooks'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/user_interface.rb:145:in `message'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:856:in `run_podfile_pre_install_hooks'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:254:in `block in download_dependencies'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:252:in `download_dependencies'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:161:in `install!'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/command/install.rb:52:in `run'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/command.rb:52:in `run'
/Users/admin/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/cocoapods-1.10.0.rc.1/bin/pod:55:in `<top (required)>'
/Users/admin/.rvm/rubies/ruby-2.4.4/bin/pod:23:in `load'
/Users/admin/.rvm/rubies/ruby-2.4.4/bin/pod:23:in `<main>'
/Users/admin/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `eval'
/Users/admin/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `<main>'

I need to upgrade cocoapods gem ?

codegen_pre_install was moved from pods script to build phase. You just need to remove the line calling that from your Podfile I believe.

gilbertl commented 3 years ago

@gilbertl Can you post your metro.config.js and installed Metro version? I gave rc.2 a spin and it works fine with my configuration.

metro 0.64

const path = require('path')
const { getDefaultConfig, mergeConfig } = require('metro-config')
const { assetExts, sourceExts } = require('metro-config/src/defaults/defaults')
const getWorkspaces = require('get-yarn-workspaces')

const cfg = async () => await getDefaultConfig()

module.exports = mergeConfig(cfg, {
  watchFolders: [
    // Repository root
    path.resolve(__dirname, '..', '..', 'node_modules'),
    // All other yarn workspaces
    ...getWorkspaces().filter(workspaceDir => !(workspaceDir === __dirname)),
  ],
  projectRoot: path.resolve(__dirname, '.'),
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
    babelTransformerPath: require.resolve('react-native-svg-transformer'),
  },
  resolver: {
    assetExts: assetExts.filter(ext => ext !== 'svg'),
    sourceExts: [...sourceExts, 'svg'],
  },
})
sylvainbaronnet commented 3 years ago

codegen_pre_install was moved from pods script to build phase. You just need to remove the line calling that from your Podfile I believe.

thanks, I followed upgrade guide helper and added these lines to Podfile : (actually that helper has only RC1 for now)

image

Not sure what you mean by moving that to build phase

sylvainbaronnet commented 3 years ago

After removing these lines I can pod install but then I got these weird errors:

image
tido64 commented 3 years ago

@gilbertl Has this ever worked for you? You're passing a function as first argument to mergeConfig() when it expects a configuration. In any case, I don't think you need to use mergeConfig in the first place as your config will be merged with default config anyway:

const path = require('path')
const { assetExts, sourceExts } = require('metro-config/src/defaults/defaults')
const getWorkspaces = require('get-yarn-workspaces')

module.exports = {
  watchFolders: [
    // Repository root
    path.resolve(__dirname, '..', '..', 'node_modules'),
    // All other yarn workspaces
    ...getWorkspaces().filter(workspaceDir => !(workspaceDir === __dirname)),
  ],
  projectRoot: path.resolve(__dirname, '.'),
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
    babelTransformerPath: require.resolve('react-native-svg-transformer'),
  },
  resolver: {
    assetExts: assetExts.filter(ext => ext !== 'svg'),
    sourceExts: [...sourceExts, 'svg'],
  },
}
grabbou commented 3 years ago

@sylvainbaronnet replace entire contents of your Podfile with this https://github.com/facebook/react-native/blob/0.64-stable/template/ios/Podfile. It is the latest version and will make things work.