react-native-mmkv: Upgrading to 1.3.3 creates compile error
Hi, after upgrading to version 1.3.3 I get the following error:
C/C++ debug|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JSI_LIB
Donwgrading to 1.3.2 again solves this issue.
About this issue
- Original URL
 - State: closed
 - Created 3 years ago
 - Reactions: 11
 - Comments: 16 (6 by maintainers)
 
Hi! Yeah, MMKV 1.3.3 requires RN 0.66 to build. I will fix this to also make it build for RN 0.65 and below when I find some free time! 😃
The issue is here
RN < 0.66 doesn’t need that block, while other libraries like react-native-mmkv-storage use something like this:
That doesn’t work here, no idea why, the
JSI_LIBvar is always empty, so it will only work for RN < 0.66.I got it working for RN 0.66 with that code but only sometimes, so will use
patch-packagewith RN < 0.66 until a proper fix is found.If anyone wants it:
react-native-mmkv+1.5.3.patch@mrousavy totaly agree. Your work is really bringing react-native forward. Some people do not understand what work is put into these kind of libraries and aparently do not appreciate it. This really is a downside of open-source… As a gesture, I bought you a coffee 😄
@Albermonte
As you can read in my previous comment, there is a solution for this problem. Simply use RN 0.66. In said comment, I also said that I will take a look at this when I have some free time. I didn’t have free time to fix your issues yet, since I am busy running a company and enjoying life. Instead of rudely asking someone that provides an awesome project for free to fix your issues, why not try to fix it yourself and contribute to the project you are using for free?
This open source software is provided as is, and I even included an Example project (
example/) here which works. It also works in all my production apps.Also, thank you Alex for the Coffee. Much appreciated! 🖤
@mrousavy All I did was asking if it was going to be fixed becuase there were no new info after almost 2 months and wanted to know if you are still working on this or just ignoring the error because it works on the latest RN version.
Sorry if the message was rude or similar, not my intention.
If you have any idea why it’s not working with RN <0.66 I can try to fix it and open a PR.
Cheers
Thanks! Upgraded to React Native 0.66 and worked just fine.
worked like a charm!
@mrousavy no stress. I just wanted to report the issue. For me that is not a problem.