-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to compile after install eslint locally (propTypes is not defined) #2528
Comments
Seem to only happen if installed eslint 4.x. I tried with eslint 3.x and in worked. But we still need to fix this since eslint should work "inside the box", isn't it? |
@trungdq88 React removed |
The problem seem to be caused by The solution IMO is to config Unfortunately |
If you mean that you installed You don't need to install it locally, it will work out of the box. Installing it locally can mess up the versions, which is what probably happened. |
@gaearon is this something worth fixing? I am happy to submit a PR. The plan should be:
|
@trungdq88 In general, yes, what you suggest sounds reasonable. I'm a bit surprised it doesn't already work like that. I'd expect |
@gaearon This build says that |
Can you diagnose why |
I am not sure about that. I tried to install
That's how I come up with the conclusion. |
I understand. I am encouraging you to go down the rabbit hole and figure out why it happens. :-) |
Thanks, I'll do more investigate. It's seem weird to me that in both scenarios I had to nuke the Anyway, are there test cases in this repo? I can't find them anywhere 😕 |
It seems like this is a I have tried it with |
I got that same error on a
|
The OP issue looks like this Yarn bug: yarnpkg/yarn#3535. I'll close in favor of it, but if you can still reproduce this after Yarn releases 0.25, please create a new issue with reproducing example. |
Please report it to Yarn. |
(and create a reproducible example) |
I had the same problem on a project with eslint installed globally. bye |
@jfroussel your tip is very helpfull! Thanks! |
ok cool |
i've the same problem with eslint 3.19 installed in the project |
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
Expected behavior
Should compile successfully.
Actual behavior
yarn start
failed to compile, showing error:propTypes is not defined
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):node -v
:npm -v
:Then, specify:
Reproducible Demo
Repo: https://github.com/trungdq88/create-react-app-issue
Travis Build: https://travis-ci.org/trungdq88/create-react-app-issue/builds/242429125
The text was updated successfully, but these errors were encountered: