'Proptypes' is not defined

I had the same problem on a project with eslint installed globally. I solved this case by installing eslint manualy in the project: npm i eslint --save

bye jeff


Please Install prop-types

using this code:

npm install --save prop-types

According to this issue comment.

It appears to be because you have installed eslint 4.x when you should just use the eslint version that is shipped with create-react-app. You should remove any eslint you have manually installed and use the one that comes with the repo.


Since react 15.5, PropTypes is included in a separate package, 'prop-types'. So this line will help

import PropTypes from 'prop-types'

You can read more here

Tags:

Reactjs

Eslint