-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. #33557
Comments
i got the same warning with ColorPropType:
for my project i dont use this directly, but when i search in so the only solution i see is for those libraries to be updated. for example, i had this error from react-native-maps. and i found that someone had already made a pr earlier: seems like a simple fix. but the work seems to fall on the libraries changing the import, instead of the react-native library. |
same |
Same, but I don't actually know what it's referring to. I don't use anything by that name directly in my code. |
i also get this errro. brush! |
saaaaaame! :( |
same.. |
This comment was marked as outdated.
This comment was marked as outdated.
So now we just ignore deprecation messages now instead of learning what we actually need to fix? Sounds like a great practice... |
@nibblesnbits Obviously if you see this warning you should update your application or handle that how you like. As mentioned above, an issue was about sub packages not having changed to ' Thanks for your comment to make a clarification. |
@Gnative, obviously if there is no documentation on what ViewPropTypes actually is within https://reactnative.dev/, no one will know what to update. |
@nibblesnbits - did you read the warning ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. |
This comment was marked as outdated.
This comment was marked as outdated.
Same Problem here.. Anyone got solution? |
how i solved the same problem. import { delete import this file from 'react-native' and its work good as I understand it, this is a mistake of the old npm packages, and if the project is alive, then the developers fix it in new versions. And maybe this error will go away when you update the package to a newer one. |
The 'ViewPropTypes' is not being used directly in this application, it's coming from some lib. So, it could be safely ignored ref: facebook/react-native#33557
The 'ViewPropTypes' is not being used directly in this application, it's coming from some lib. So, it could be safely ignored ref: facebook/react-native#33557
The 'ViewPropTypes' is not being used directly in this application, it's coming from some lib. So, it could be safely ignored ref: facebook/react-native#33557
Does anybody know why those types became deprecated? Yes, we can import them from 'deprecated-react-native-prop-types' but what are non-deprecated alternatives now? |
Up until now, is that the best solution is to just IGNORE the warning? I think they should deprecate it in the underlaying codebase! Or at least provide us a config option to dismiss the warning!! |
If you have fixed the depreciation in your own codebase and the warning is coming from installed packages then I guess yes ignoring the warning is an option. You could make a pull request for those packages that are causing the warnings. |
Something tells me this warning is going to LINGER for quite some time with some of the older packages. |
I tried your solutions to ignore the warnings but this is really weird, it doesn't work. I already used LogBox plenty of times to ignore some warnings and it worked perfectly well but I just kept trying for 2 hours to ignore these ones and it's not working doesn't matter what I tried :
Could you help ? Thx ! |
It looks like you have spaces at the end of the sentences. |
Okay for the time talking because this warning is a ball breaker until all the libraries using it update i am dong the following. If you like to see the errors just don't use this solution but for me i need to see important stuff on the console not warnings spam. Gave you two extra warnings types in case you are using
|
Thanks for the help @Adnan-Bacic but unfortunately, I don't have any spaces at the end of my sentences. I copied and pasted almost all of the variants that had been posted on this thread and the warning is always here. I don't get how this is possible since I succeeded to make it work with other warning messages. |
Can someone explain this in a react native noob friendly way? Where am I supposed to put the |
facing same issue. ignore logs has no effect on warnings |
I face the same error |
Yea this seems like a weird solution, there's tons of libraries out there that use this option and the expectation to patch every single one of them manually is bad, is there a more automated solution/configuration we can use? |
You should patch just react-native package like to back some things to the lowest version. You shouldn't patch every library just react-native package. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
the package "react-native-slider" is based from "@react-native-community/slider". step 1: Remove react-native-slider
step 2: Install slider community.
step 3: Edit files:
With simples steps you can should run the proyect |
@vinaciotm where does |
@tiagomsmagalhaes |
Thanks. After hours trying to solve with patch this solution seems to be the best. After I applied "resolvePath()" my "alias" stopped working so I had to adapt.
|
@niloriver my "alias" stopped working too. How do you resolve that? with this code? I have edited my babel.config.js like this but still not working.
@vinaciotm I using yarn not expo, so how can I use it with yarn?
|
If you are facing this problem because you installed this package recently, I recommend installing https://www.npmjs.com/package/react-native-floating-action instead |
it gives and error saying "app-root/App.js: path is not defined" |
This comment was marked as outdated.
This comment was marked as outdated.
path is missing. add
@niloriver after adding the resolvePath my alias is stopped working too, so i update the resovelvePath with:
|
I had this problem with |
i face the same issue i tried every solution even i tried developers on freelancer no one could know what is wrong idont use PropTypes any where after i have done the react native index file solution another problem showed TypeError: undefined is not an object (evaluating '_reactNative.Text.propTypes.style') i am really frustrated please any help! |
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[4], "C:\Users\gorke\Desktop\projects\mobile\resolver\react-native").UIManager.getViewManagerConfig') I started getting such an error, how can I solve it? version 0.71.6 |
Just look at the log and stacktraces |
Summary: ## Overview When I implemented `ignoreLogs` it was originally just to move `console.ignoreYellowBox` over to LogBox. When I did that, I also added filtering for console messages too. My thought process was: Developers probably don't want to configure hiding logs twice, so the LogBox method can handle both. This was a mistake. We should never hide console errors and warnings, because it completely silences important feedback to the users such as deprecation warnings. These issues should be fixed, not silenced, and since adding the silencing behavior it's clear that this feature is being abused to ignore legitimate warnings that need address. Issue facebook#33557 is a great reason why - the correct fix for this is not to ignore the errors, it's to address the deprecation / removal of the API. Allowing an easy `ignoreLog` method to hide the problem made this migration much more painful. Thus, we're reverting back to the pre-logbox behavior of always showing console logs, even if they're ignored by LogBox in the app UI. Hopefully, this results in more of these issue being addressed instead of ignored. Changelog: [General] [Changed] - Do not filter errors/warnings from console Reviewed By: yungsters Differential Revision: D40724661 fbshipit-source-id: de3d2db1b0c32dee96acf92c9b1ca07ba0f4e218
This comment was marked as outdated.
This comment was marked as outdated.
* ViewPropTypes were removed from react-native when from 0.68.0 * reference link: facebook/react-native#33557
I updated all library files having ViewPropTypes and PropTypes from "prop-types" But it actually worked for me! Thanks!!! |
UpdatePropTypes were originally deprecated in React in 2017. React Native deprecated PropTypes in 2021. In React 19, we’re removing the propType checks from the React package, and using them will be silently ignored. While this may cause frustration in the short-term, forcing a migration now (after 7 years of deprecations) will increase app perf (by not running the checks) and prevent greater frustration in the future (since type systems are more robust) This means, even if you migrate to I know this is frustrating, but please migrate to a type system, or file an issue or fork in package dependencies that still use PropTypes. Locking the thread because I can't keep up with the comments recommending patching react native. |
Description
Recentrly update React ANtive Version to
"react-native": "0.68.0",
and have this issue
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN EdgeInsetsPropType will be removed from React Native. Migrate to EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'. WARN EdgeInsetsPropType will be removed from React Native. Migrate to EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'. WARN PointPropType will be removed from React Native. Migrate to PointPropType exported from 'deprecated-react-native-prop-types'. WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
Version
0.68.0
Output of
npx react-native info
System:
OS: macOS 12.3.1
CPU: (8) x64 Apple M1
Memory: 30.51 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.8.0 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.5.5 - /usr/local/bin/npm
Watchman: 2022.03.14.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 30, 32
Build Tools: 30.0.2, 32.0.0, 32.1.0
System Images: android-30 | Intel x86 Atom_64, android-32 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.0 => 0.68.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
npx react-native start
Snack, code example, screenshot, or link to a repository
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN EdgeInsetsPropType will be removed from React Native. Migrate to EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'.
WARN EdgeInsetsPropType will be removed from React Native. Migrate to EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'.
WARN PointPropType will be removed from React Native. Migrate to PointPropType exported from 'deprecated-react-native-prop-types'.
WARN ColorPropType will be removed from React Native. Migrate to ColorPropType exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
WARN ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
The text was updated successfully, but these errors were encountered: