WatermelonDB: [Bug][iOS] 'jsi/jsi.h' file not found

Hi!

After update from 0.16.0 to 0.16.1 I get this error:

In file included from /node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/JSLockPerfHack.mm:1:

/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/JSLockPerfHack.h:3:10: fatal error: 'jsi/jsi.h' file not found
#include <jsi/jsi.h>
         ^~~~~~~~~~~
1 error generated.
Screenshot 2020-05-19 at 13 03 05

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 22 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I had this issue too. For this I added a Header Search Path to the xcode project target build settings.

  1. Find file node_modules/@noze/watermelondb/native/ios/WatermelonDB.xcodeproj and open it in Xcode
  2. Add $(SRCROOT)/../../../../../ios/Pods/Headers/Public/React-jsi recursive path to your settings like in the pic below. Screen Shot 2020-05-28 at 4 34 25 PM
  3. Click off the popover window to make it disappear and try to build ios again.

Notes: This only works if you have the ios directory in your project root. So if you have it set up differently, it will still fail. This might not be the correct way to include these headers, but it’s what I found. jsi/jsi.h is all over the place. In the react-native package it’s inside ReactCommon but I had more issues when I added that path.

image

@radex I tried to fork and create a PR for this but it looks like master isn’t up to date with the 0.17.0-2 tag so I had some trouble testing.

have the same error with 0.16.0 =((( react-native: 0.61.5 X-code 11.5 Using pods

I can confirm that 0.16.1-0 still works.

@finom You have to change the files directly on node_modules folder as mentioned on https://github.com/Nozbe/WatermelonDB/issues/691#issuecomment-635648157 and then run patch-package. It’s going to create a patch like we ours here

@finom use patch-package to make the patch persistent. Watermelon v0.17 will have the patch