Skip to content

Failed to compile after install eslint locally (propTypes is not defined) #2528

Closed
@trungdq88

Description

@trungdq88

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

Yes, on OSX Sierra.

Description

create-react-app test
cd test/
yarn add eslint
yarn start

Expected behavior

Should compile successfully.

Actual behavior

yarn start failed to compile, showing error: propTypes is not defined

image

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
[email protected] /Users/dinhquangtrung/Desktop/test
└── [email protected]
  1. node -v:
v8.1.0
  1. npm -v:
5.0.3

Then, specify:

  1. Operating system: OSX Sierra
  2. Browser and version: (any)

Reproducible Demo

Repo: https://github.com/trungdq88/create-react-app-issue
Travis Build: https://travis-ci.org/trungdq88/create-react-app-issue/builds/242429125

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions