mrousavy / react-native-mmkv

⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!
https://mrousavy.com
MIT License
5.91k stars 254 forks source link

CMake error #730

Closed Hatta-Food-Hub closed 3 weeks ago

Hatta-Food-Hub commented 4 weeks ago

and trying to run the debug build

_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -MD -MT CMakeFiles/appmodules.dir/Users/billion/Desktop/Hatta/HFHDriver/android/app/build/generated/rncli/src/main/jni/rncli.cpp.o -MF CMakeFiles/appmodules.dir/Users/billion/Desktop/Hatta/HFHDriver/android/app/build/generated/rncli/src/main/jni/rncli.cpp.o.d -o CMakeFiles/appmodules.dir/Users/billion/Desktop/Hatta/HFHDriver/android/app/build/generated/rncli/src/main/jni/rncli.cpp.o -c /Users/billion/Desktop/Hatta/HFHDriver/android/app/build/generated/rncli/src/main/jni/rncli.cpp C/C++: In file included from /Users/billion/Desktop/Hatta/HFHDriver/android/app/build/generated/rncli/src/main/jni/rncli.cpp:25: C/C++: /Users/billion/Desktop/Hatta/HFHDriver/node_modules/react-native-mmkv/android/../cpp/NativeMmkvModule.h:25:43: error: use of undeclared identifier 'NativeMmkvMode' C/C++: std::optional>; C/C++: ^ C/C++: /Users/billion/Desktop/Hatta/HFHDriver/node_modules/react-native-mmkv/android/../cpp/NativeMmkvModule.h:26:29: error: use of undeclared identifier 'MMKVConfig' C/C++: template <> struct Bridging : NativeMmkvConfigurationBridging {}; C/C++: ^ C/C++: /Users/billion/Desktop/Hatta/HFHDriver/node_modules/react-native-mmkv/android/../cpp/NativeMmkvModule.h:26:75: error: use of undeclared identifier 'MMKVConfig' C/C++: template <> struct Bridging : NativeMmkvConfigurationBridging {}; C/C++: ^ C/C++: /Users/billion/Desktop/Hatta/HFHDriver/node_modules/react-native-mmkv/android/../cpp/NativeMmkvModule.h:35:49: error: unknown type name 'MMKVConfig' C/C++: jsi::Object createMMKV(jsi::Runtime& runtime, MMKVConfig config); C/C++: ^ C/C++: 4 errors generated.

Task :app:buildCMakeDebug[arm64-v8a] FAILED

maintenance-hans[bot] commented 4 weeks ago

Guten Tag, Hans here! 🥨

Thanks for your support by sponsoring react-native-mmkv! It looks like you're running into a build error related to some undeclared identifiers in the C++ files.

Could you provide more context on your environment? Please include details such as your react-native-mmkv version, the version of React Native you're using, and any other relevant dependencies. Also, if you could share the full build logs, that would help us diagnose ze issue much better!

Looking forward to your response! 🍻

Note: If you think I made a mistake, please ping @mrousavy to take a look.

Hatta-Food-Hub commented 4 weeks ago

Guten Tag, Hans here! 🥨

Thanks for your support by sponsoring react-native-mmkv! It looks like you're running into a build error related to some undeclared identifiers in the C++ files.

Could you provide more context on your environment? Please include details such as your react-native-mmkv version, the version of React Native you're using, and any other relevant dependencies. Also, if you could share the full build logs, that would help us diagnose ze issue much better!

Looking forward to your response! 🍻

Note: If you think I made a mistake, please ping @mrousavy to take a look.

Guten Tag,

this is my info

System: OS: macOS 14.6.1 CPU: (12) arm64 Apple M2 Pro Memory: 843.67 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.13.1 path: ~/.nvm/versions/node/v20.13.1/bin/node Yarn: version: 3.6.4 path: ~/.nvm/versions/node/v20.13.1/bin/yarn npm: version: 10.5.2 path: ~/.nvm/versions/node/v20.13.1/bin/npm Watchman: version: 2024.01.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

maintenance-hans[bot] commented 4 weeks ago
it ain't much, but it's honest work
Hatta-Food-Hub commented 4 weeks ago

dependencies

"react": "18.2.0", "react-native": "0.74.3", "react-native-mmkv": "^3.0.2",

 "@react-navigation/bottom-tabs": "^6.6.0",
"@react-navigation/drawer": "^6.7.1",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.10.0",
Hatta-Food-Hub commented 4 weeks ago

After @mrousavy has suggested moving from beta to this latest release this issue is coming it was earlier as well

321paranoiawhy commented 3 weeks ago

Same error, I re-codegen, but it did not help, can anyone solve this? Info may be valuable:

The errors are:

321paranoiawhy commented 3 weeks ago

Same error, I re-codegen, but it did not help, can anyone solve this? Info may be valuable:

  • react-native: 0.74.2
  • react-native-mmkv: ^3.0.2
  • development platform: macOS
  • target platform: android

The errors are:

  • error: use of undeclared identifier 'NativeMmkvMode'
  • error: use of undeclared identifier 'MMKVConfig'
  • error: unknown type name 'MMKVConfig'

After downgrade react-native-mmkv to 3.0.1, the errors disappear, hope this can help others.

mrousavy commented 3 weeks ago

I mentioned that in the release notes. 3.0.2 requires RN 75, 3.0.1 requires RN 74.

waqarAllshore commented 3 weeks ago

same issue here

LouisCapelle commented 1 week ago

same issue here with fresh project

VladyslavKochetkov commented 5 days ago

I mentioned that in the release notes. 3.0.2 requires RN 75, 3.0.1 requires RN 74.

I feel like that should be more than just a patch upgrade