Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Module '"react-native"' has no exported member 'NativeMethodsMixinStatic' #2793

Closed
3 tasks done
mrbrentkelly opened this issue Apr 15, 2020 · 1 comment
Closed
3 tasks done

Comments

@mrbrentkelly
Copy link
Contributor

mrbrentkelly commented Apr 15, 2020

Bug Report

To Do First

  • Did you try latest release?
  • Did you try master? (Didn't 'try' it but searched for NativeMethodsMixinStatic)
  • Did you look for existing matching issues?

Platforms

Versions

  • react-native-camera: 3.23.0
  • react-native: 0.62.5
  • react: 16.11.0

Description/Current Behaviour

After upgrading to React Native 0.62.5 and react-native-camera 3.23.0, typescript compile (tsc) is failing with the following error:

node_modules/react-native-camera/types/index.d.ts:14:10 - error TS2724: Module '"react-native"' has no exported member 'NativeMethodsMixinStatic'. Did you mean 'NativeMethodsMixinType'?

14 import { NativeMethodsMixinStatic, ViewProperties, findNodeHandle } from 'react-native';

Expected Behaviour

typescript compile should pass

Steps to Reproduce

Create RN project

npx react-native init RNUpgrade --template react-native-template-typescript

Add RNC import in App.tsx

import { RNCamera } from 'react-native-camera';

Compile TypeScript

yarn tsc

Additionals

Looks like NativeMethodsMixinStatic was renamed to NativeMethods in @types/react-native. See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43179/files#diff-054a3bd6f6ba9a4f60119c781c2a63f6R292

@mrbrentkelly
Copy link
Contributor Author

Fixed in 3.23.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants