Watermelondb: Watermelon db won't install with RN 0.63

Created on 24 Aug 2020  路  1Comment  路  Source: Nozbe/WatermelonDB

I have installed following to my package json

 "@nozbe/watermelondb": "^0.19.0",
   "@nozbe/with-observables": "^1.0.5",

I have added .babelrc file with following data

{
  "presets": ["module:metro-react-native-babel-preset"],
  "plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
}

I have already enabled swift support in my iOS project.
RN 0.63 supports auto linking so when I do pod installin iOS folder I get following error

The Swift podWatermelonDBdepends uponReact-jsi, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!globally in your Podfile, or specify:modular_headers => truefor particular dependencies.

I tried adding following in my Podfile as well

Screenshot 2020-08-24 at 5 44 28 PM

but still getting same issue. Are the docs updated for RN 0.63

Most helpful comment

That worked for me

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'ProjectName' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'


  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

>All comments

That worked for me

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'ProjectName' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'


  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdnichollsc picture jdnichollsc  路  4Comments

rafaelcamaram picture rafaelcamaram  路  5Comments

markorusic picture markorusic  路  4Comments

FabianEscarate picture FabianEscarate  路  6Comments

mikebeyer picture mikebeyer  路  7Comments