"Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead"
See original GitHub issueI’m getting this error. I believe the warning is originating from either:
a) styled-components b) one of its deps
I’m using create-react-app
and my only added dep is styled-components
. Removing styled-components
makes the warning message go away.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Accessing PropTypes via the main React package is deprecated
Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. I install. npm i prop-types -S. but ......
Read more >Warning: Accessing PropTypes via the main React ... - GitHub
Warning : Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. #366.
Read more >Warning: Accessing PropTypes via the main React ... - Laracasts
What is this error? Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. content.js:5025.
Read more >[Solved]-Accessing PropTypes via the main React package is ...
Since the release of React v15.5.0 React.PropTypes is deprecated and has moved to another library. You should use npm install prop-types and use...
Read more >Warning: Accessing PropTypes via the main React package is ...
Warning : Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.*...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@k15a this should be fixed in
1.4.5
right? At least that’s what the changelog says, still getting the warning tho.If I look where it’s coming from:
styled-components/lib/types.js
which contains the following compiled code:@k15a @philpl @geelen could you please reopen this issue meanwhile and even maybe release
1.4.x
? There must be thousands of devs who see the warning now 😃Switching to
v2
until it’s stable is something most of us would probably prefer to avoid.