mrousavy / react-native-mmkv

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

Unable to resolve module ./createMMKV.mock #657

Closed sanowar-drivex closed 3 months ago

sanowar-drivex commented 6 months ago

im getting error while creatingstorage import { MMKV } from 'react-native-mmkv'; export const storage = new MMKV()

None of these files exist:

None of these files exist:

sanowar-drivex commented 6 months ago

i got another error also [Error: InternalError Metro has encountered an error: While trying to resolve module react-native-mmkv from file /home/lap099/Desktop/drivex-mobile-frontend/src/App.jsx, the package /home/lap099/Desktop/drivex-mobile-frontend/node_modules/react-native-mmkv/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/home/lap099/Desktop/drivex-mobile-frontend/node_modules/react-native-mmkv/lib/module/index. Indeed, none of these files exist:

mrousavy commented 3 months ago

It is in the package though.

Maybe it's an issue with your setup. Can you post the contents of the lib folder in node_modules here?

image