morrowdigital / watermelondb-expo-plugin

119 stars 30 forks source link

Dev Client build fails #17

Closed julian-gargicevich closed 1 year ago

julian-gargicevich commented 1 year ago

I'm getting this error when trying to build the custom dev client

› Compiling react-native Pods/React-RCTBlob » RCTBlobManager.mm

❌  (node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h:2:9)

  1 | #if __has_include("FMDB.h")
> 2 | #import "FMDB.h"
    |         ^ include of non-modular header inside framework module 'WatermelonDB.Bridging': '/Users/expo/workingdir/build/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/FMDB/src/fmdb/FMDB.h'
  3 | #else
  4 | #import "../FMDB/src/fmdb/FMDB.h"
  5 | #endif

❌  (node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h:10:9)

   8 | 
   9 | #if __has_include("DatabaseDeleteHelper.h")
> 10 | #import "DatabaseDeleteHelper.h"
     |         ^ include of non-modular header inside framework module 'WatermelonDB.Bridging': '/Users/expo/workingdir/build/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/swift/DatabaseDeleteHelper.h'
  11 | #else
  12 | #import "../DatabaseDeleteHelper.h"
  13 | #endif
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
▸ ** BUILD FAILED **
▸ The following build commands failed:
▸   SwiftEmitModule normal x86_64 Emitting\ module\ for\ WatermelonDB (in target 'WatermelonDB' from project 'Pods')
▸   SwiftEmitModule normal arm64 Emitting\ module\ for\ WatermelonDB (in target 'WatermelonDB' from project 'Pods')
▸ (2 failures)
** BUILD FAILED **

My plugins in app.json looks like this:

"plugins": [
      [
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "static",
            "deploymentTarget": "16.2"
          },
          "android": {
            "kotlinVersion": "1.6.10"
          }
        }
      ],
      [
        "@morrowdigital/watermelondb-expo-plugin",
        {
          "databases": ["morrow.db"]
        }
      ],

I'm using:

brunokiafuka commented 1 year ago

Hi @julian-gargicevich, we are working on it.

julian-gargicevich commented 1 year ago

Thanks for the quick reply @brunokiafuka

Docs say it was tested with expo 48? Which version? I'm happy to downgrade in order to get it to work until you fix the issue

brunokiafuka commented 1 year ago

We have test with expo 48 and watermelonDB v0.25.5

brunokiafuka commented 1 year ago

Hi @julian-gargicevich can you install "@morrowdigital/watermelondb-expo-plugin": "^2.1.1" and re-run the npx expo run:[ios | android]. This new version aims to fix "@nozbe/watermelondb": "^0.26.0", please make sure that you have it on the lates version.

Feel free to reopen the issue if this persists. Thanks :)

julian-gargicevich commented 1 year ago

Getting the same error when running eas build to build the dev client :(

brunokiafuka commented 1 year ago

If you managed to successfully generate custom dev-client, and the issue only when running eas build this might be related to eas cache, so you can maybe try disable it and re-run the build.

https://docs.expo.dev/build-reference/caching/#javascript-dependencies

Let me know if this works.

julian-gargicevich commented 1 year ago

eas build is used to generate the dev client, tried flushing everythig cache related and still getting the same error. I'll try with a new project to see if it's related to my project but it doesn't look like it? Saw someone else was getting a similar error with the non-modular headers