I tried to init new project and follow the example from watermelon db, and I can't resolve the error of TypeError: from.from ~ from observable.
I tried to using withObservable in new simple project but still can't using observable.
these are my repositories:
1) https://github.com/auliakbarh/WatermelondbExample (follow the example from watermelon db)
2) https://github.com/auliakbarh/HazardReporting
I always get an error from.from
For my part, I was not able to migrate my app from 0.61.5 to 0.62.1 due to compilation errors on watermelondb (I have the same error on newly created project)
/Users/mlecoq/work/archireport/dev/TestWatermelon/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/../FMDB/src/fmdb/FMDB.h:1:9: note: while building module 'Foundation' imported from /Users/mlecoq/work/archireport/dev/TestWatermelon/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/../FMDB/src/fmdb/FMDB.h:1:
#import <Foundation/Foundation.h>
@mlecoq This seems to be an unrelated issue with Flipper and iOS, if you read through the react-native issues you will see they are still sorting out some major bugs. I would recommend removing Flipper for iOS until those issues have been resolved, ie:
pod install to remove the Flipper podsOk I will try this. I thought it was related to watermelondb since as soon as I remove it as a dependency my project can be built
@kilbot It works fine, thanks !
@mlecoq there does seem to be some conflict between WatermelonDB and Flipper for iOS. I believe it has something to do with Swift but I am not sure ... however, if you look at the react-native issues you will see there are some problems are still being worked out so it's probably worthwhile disabling Flipper for iOS until we see some more patch releases from react-native.
Note: you can still use Flipper for Android debugging.
I got the same issue after upgrading to 0.62. I fixed it by upgrading rx js to version 6 and deleting all node modules and installing again
Can confirm - Flipper via RN 0.62 and Watermelondb is a no go. Had to remove Flipper.
@mlecoq This seems to be an unrelated issue with Flipper and iOS, if you read through the react-native issues you will see they are still sorting out some major bugs. I would recommend removing Flipper for iOS until those issues have been resolved, ie:
- Comment out Flipper references in AppDelegate.m
- Comment out Flipper references in Podfile
pod installto remove the Flipper pods
Thanks Bro!!... Had to remove Flipper and working for me
Hey guys, I had no problems building my project after upgrading to RN 0.62 and using flipper.
What I had to do is use "Legacy Build System" in the "Workspace Settings" from xcode.
I don't know if this is a possibility for you guys... my project works fine. Building for both tests and run
I got Flipper and WatermelonDB working together.
So the problem here is that WatermelonDB has a recursive header search path set on Pods/Headers/Public, which includes the Flipper-Folly pod. I believe that is causing conflicts, which causes it to fail to build. WatermelonDB actually only need access to the React-Core pod, so you can update its header search path from $(SRCROOT)/../../../../../ios/Pods/Headers/Public to $(SRCROOT)/../../../../../ios/Pods/Headers/Public/React-Core and it will build correctly.
To edit the Header Search Paths, select WatermelonDB.xcodeproj, go to Build Settings and edit Header Search Paths under the Search Paths heading.
I just put a PR up to fix the issue: https://github.com/Nozbe/WatermelonDB/pull/660
After remove the Flipper, it works.!!
But do you have news about this issue?
@fhugoduarte See my previous comments. It has been fixed and there is a PR up. You don't have to remove Flipper, there is a simple workaround.
This PR has now been merged and released in version 16.1. This issue should be able to be closed now.
Still facing this on android
"@nozbe/watermelondb": "0.17.0-3", (tried 16.1, 16.2, 15.0...)
"@nozbe/with-observables": "1.0.5"
Only way i got it working:
The walk around for this issue is to change
var from = require('rxjs/observable/from');
to
var from = require('rxjs');
in\node_modules\@nozbe\with-observables\dist\with-observables.cjs.js_Originally posted by @YajanaRao in https://github.com/Nozbe/WatermelonDB/issues/502#issuecomment-535893396_
editing the node_modules shouldn't be an official fix for this
Most helpful comment
I got Flipper and WatermelonDB working together.
So the problem here is that WatermelonDB has a recursive header search path set on
Pods/Headers/Public, which includes theFlipper-Follypod. I believe that is causing conflicts, which causes it to fail to build. WatermelonDB actually only need access to theReact-Corepod, so you can update its header search path from$(SRCROOT)/../../../../../ios/Pods/Headers/Publicto$(SRCROOT)/../../../../../ios/Pods/Headers/Public/React-Coreand it will build correctly.To edit the Header Search Paths, select WatermelonDB.xcodeproj, go to Build Settings and edit Header Search Paths under the Search Paths heading.