Cannot find prop-types
See original GitHub issueIssue Description
Here is what I did:
- downloaded code
- go to example, run npm install
- react-native run-ios.
I got the following error:
Bundling index.ios.js
99.4% (327/328), failed.
error: bundling failed: "Unable to resolve module prop-types
from /Users/jack/Dev/react-native-gifted-chat/src/GiftedChat.js
: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all
.\n 2. Delete the node_modules
folder: rm -rf node_modules && npm install
.\n 3. Reset packager cache: rm -fr $TMPDIR/react-*
or npm start -- --reset-cache
.
Steps to Reproduce / Code Snippets
- downloaded code
- go to example, run npm install
- react-native run-ios.
Expected Results
[FILL THIS OUT]
Additional Information
- React Native version: [0.46.3]
- react-native-gifted-chat version: [latest]
- Platform(s) (iOS, Android, or both?): [latest]
Issue Analytics
- State:
- Created 6 years ago
- Comments:12
Top Results From Across the Web
Can't find variable: PropTypes - Stack Overflow
I am trying some react native code. Added props for my component based on the instructions given in this blog. End up in...
Read more >prop-types - npm
Runtime type checking for React props and similar objects. You can use prop-types to document the intended types of properties passed to ...
Read more >Can't find variable: PropTypes · Issue #20852 - GitHub
Hi Team ,. I tried to run existing react native project but after install on mobile. I could see only this error.
Read more >[Solved]-Can't find variable: PropTypes-Reactjs - appsloveworld
Coding example for the question Can't find variable: PropTypes-Reactjs. ... You need to do install prop-types with npm install --save prop-types or yarn...
Read more >Don't Call PropTypes Warning - React
This happens because React doesn't see a “secret” last argument that it passes to detect manual PropTypes calls. Here is how to fix...
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 Free
Top 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
Same issue here.
You have to manually fix it by
npm i -S prop-types
and then go to every dependency which is usingReact.PropTypes
notation orimport React, {PropTypes} from 'react'
and replace withimport PropTypes from 'prop-types