question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find prop-types

See original GitHub issue

Issue Description

Here is what I did:

  1. downloaded code
  2. go to example, run npm install
  3. 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

  1. downloaded code
  2. go to example, run npm install
  3. 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:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
kevintsengcommented, Sep 11, 2017

Same issue here.

1reaction
ptflycommented, Jul 31, 2017

You have to manually fix it by npm i -S prop-types and then go to every dependency which is using React.PropTypes notation or import React, {PropTypes} from 'react' and replace with import PropTypes from 'prop-types

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found