-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: _reactNativeMmkv.MMKV.set is not a function #1
Comments
react-native info:
|
enable hermes && do not use chrome debugger (use flipper) fixed the error |
Yes, so you cannot use the Chrome debugger when using JSI. This is due to the fact that when you are debugging with Chrome, your JavaScript actually does not execute on your device and therefore does not have direct access to JSI. (The bridge still works but that's another story). So you have to use Flipper debugger, or write such good code that you have to never debug again 🤗 |
@douugbr which MMKV version are you on? |
The issue was happening on the latest 1.0.11 version, I just tried downgrading to 1.0.10 and it fixed my problem, but I'd be glad to upgrade again to help you in troubleshooting. |
I'm currently investigating this and will rewrite the JSI installer to be a turbo module. That should fix it. So stay on the version that's currently working for you and watch the "Releases" section here ;) |
@douugbr just to confirm - does it work for you now with the latest version + the (temporary) additional installation steps for Android? |
@mrousavy unfortunately, due to the issues I was experiencing that day, I chose to try ammarahm-ed's version of a MMKV RN implementation, but I will install yours again in a side project to test once I have the time to, and if it works I'll let you know. |
@douugbr oh yeah he also rewrote it in JSI shortly after I did 😅 |
* feat: Support `id` on web Local storage does not have a concept of separate stores in user code, this change emulates that behaviour by prefixing the keys in local storage with `id`. This retains backwards compatibility with existing web MMKV stores by treating the the default `mmkv.default` id is as prefixless. Fixes #520 * feat: Adds a check to key and id values to reject our wildcard character on web (a backslash) (#1) * feat: Adds a check to key and id values to reject our wildcard character on web (a backslash) --------- Co-authored-by: Jonathan Jacobs <jonathan@yoco.co.za> Co-authored-by: CannibalKush <45557293+CannibalKush@users.noreply.github.com>
Steps
yarn install
cd ios && pod install
import {MMKV} from 'react-native-mmkv
...
MMKV.set(email, LAST_TYPED_EMAIL)
After entering that code I get the error TypeError: _reactNativeMmkv.MMKV.set is not a function. Furthermore, after logging the MKV object, I have attached the following screen. It seems there is an issue with the native code and JS not being linked as all the methods are undefined.
The text was updated successfully, but these errors were encountered: