ReactJS: how to find dependencies that still use PropTypes via the main react package

I changed my app (meteorJS based) to package prop-types

but I still get warningWarning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

So, I think there is some kind of dependency that still uses the "old" style. But how do you find this dependence?

This is what the console gives me:

modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:13361 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
printWarning @ modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:13361
warning @ modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:13385
get @ modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:9932
PropTypes.js @ modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:32612
fileEvaluate @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343
require @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238
index.js @ modules.js?hash=49c6db2db08899db6ed5ab18f5681ac3bb3d8eab:32381
fileEvaluate @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343
require @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238
main.js @ main.js:1
fileEvaluate @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343
require @ modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238
(anonymous) @ app.js?hash=bbc39e8f76f81774071d5c0341cfd78e2baf4ccc:25882

      

+3


source to share


1 answer


I used a simple text search in the 'node_modules' directory to find a string that might have the old style of importing PropTypes from 'response';

grep -R "PropTypes.*'react" node_modules/

      



And with this tool, find the project that is throwing warning messages from grep output.

+1


source







All Articles