Closed ORESoftware closed 4 years ago
oh same problem trying to resolve(
I think it's b/c the project is missing an index.js file
@ORESoftware @superbelko1 I have just published a new version (1.2.2) with an index.js file and a main key in the package.json. Can you try it out and tell me if that fixes your problem ?
Thanks in advance.
Yeah I don't think it worked, I logged "RAAZZZOOOOM":
and I still get that error:
I am not sure why :(
ok so it's not because of index.js, it's because NativeModules from react-native doesn't have the export...
if we run:
import { NativeModules, Platform } from 'react-native';
console.log(Object.keys(NativeModules));
I get:
"AppState",
"DevSettings",
"DevLoadingView",
"StatusBarManager",
"LinkingManager",
"ExponentNotifications",
"ExponentUpdates",
"ExceptionsManager",
"NativeUnimoduleProxy",
"UMReactNativeEventEmitter",
"AsyncLocalStorage",
"AIRGoogleMapManager",
"AIRGoogleMapMarkerManager",
"AIRMapManager",
"AIRMapMarkerManager",
"LottieAnimationView",
"ExponentAR",
"ExpoNativeModuleIntrospection",
"ExponentSplashScreen",
"ExponentTest",
"RNCViewPager",
"ReanimatedModule",
"RNAWSCognito",
"RNCAppearance",
"RNCNetInfo",
"RNCSafeAreaView",
"RNCWebViewManager",
"RNGestureHandlerModule",
"RNSharedElementTransition",
"RNSVGRenderableManager",
"RNSVGCircleManager",
"RNSVGEllipseManager",
"RNSVGGroupManager",
"RNSVGForeignObjectManager",
"RNSVGImageManager",
"RNSVGLineManager",
"RNSVGMarkerManager",
"RNSVGMaskManager",
"RNSVGPathManager",
"RNSVGPatternManager",
"RNSVGRectManager",
"RNSVGSvgViewManager",
"RNSVGTextManager",
"RNSVGTextPathManager",
"RNSVGTSpanManager",
"RNSVGUseManager",
"RNViewShot",
"AccessibilityManager",
"AlertManager",
"Clipboard",
"DeviceInfo",
"I18nManager",
"KeyboardObserver",
"ModalManager",
"RedBox",
"ScrollViewManager",
"SourceCode",
"Timing",
"TVNavigationEventEmitter",
"UIManager",
"WebSocketModule",
"ImageEditingManager",
"ImageStoreManager",
"PlatformConstants",
"ActionSheetManager",
"NativeAnimatedModule",
"BlobModule",
"FileReaderModule",
"ImageViewManager",
"NetInfo",
"Networking",
"SettingsManager",
"Vibration",
So perhaps the module is not linked properly. I am in an expo project and the install instructions say:
yarn add react-native-image-resizer
cd ios && pod install
but I don't have a folder called "ios" in my project
I'm not sure they have added a way to add custom native modules on expo. You need to use what they provide or eject.
There is no "main" property in package.json:
and I am getting:
and the code is just:
everything compiles with typescript tho! :(
there is no index.js file in the project: