Description
My app is not using ViewPropTypes, but our Datadog library is raising the error that something is using them, and we are getting the error that I've seen in the issue.
I've tried the https://www.npmjs.com/package/deprecated-react-native-prop-types, but the error still persists.
If I run
grep -r "ViewPropTypes" node_modules/
it gives me the attached output. I've tried replacing all the imports ie
import type {ViewProps} from '../Components/View/ViewPropTypes'
to
import type {ViewProps} from 'deprecated-react-native-prop-types'
and then running a patch-package, but I get a result that there are no differences
At this point Im a bit stumped on how to fix this error, it's not crashing the app but it's really annoying during development.
If someone could provide suggestions I would appreciate it.
Steps to reproduce
Please review logs in stacktrace
React Native Version
0.73.9
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 223.73 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.19.1
path: ~/.nvm/versions/node/v18.19.1/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v18.19.1/bin/yarn
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v18.19.1/bin/npm
Watchman:
version: 2024.07.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/eh/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK:
API Levels:
- "28"
- "30"
- "31"
- "33"
- "34"
Build Tools:
- 30.0.2
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
System Images:
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /Users/eh/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 3.2.2
path: /Users/eh/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.9
wanted: 0.73.9
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
node_modules//@types/react-native/index.d.ts:export const ViewPropTypes: React.ValidationMap<ViewProps>;
node_modules//@types/react-native-htmlview/node_modules/react-native/types/index.d.ts:export * from '../Libraries/Components/View/ViewPropTypes';
node_modules//@types/react-native-htmlview/node_modules/react-native/Libraries/Image/ImageBackground.js:import type {ViewProps} from '../Components/View/ViewPropTypes';
native/Libraries/Modal/Modal.d.ts:import {ViewProps} from '../Components/View/ViewPropTypes';
node_modules//@types/react-native-htmlview/node_modules/react-native/Libraries/Modal/Modal.js:import type {ViewProps} from '../Components/View/ViewPropTypes';
.... more to follow but had to chop it off, there is a limit to characters
Reproducer
n/a
Screenshots and Videos
__
Description
My app is not using ViewPropTypes, but our Datadog library is raising the error that something is using them, and we are getting the error that I've seen in the issue.
I've tried the https://www.npmjs.com/package/deprecated-react-native-prop-types, but the error still persists.
If I run
it gives me the attached output. I've tried replacing all the imports ie
import type {ViewProps} from '../Components/View/ViewPropTypes'
to
import type {ViewProps} from 'deprecated-react-native-prop-types'
and then running a patch-package, but I get a result that there are no differences
At this point Im a bit stumped on how to fix this error, it's not crashing the app but it's really annoying during development.
If someone could provide suggestions I would appreciate it.
Steps to reproduce
Please review logs in stacktrace
React Native Version
0.73.9
Affected Platforms
Runtime - iOS
Output of
npx react-native infoStacktrace or Logs
Reproducer
n/a
Screenshots and Videos