### [Edit by hzoo] - if you are experiencing this error, pin to ESLint 2.2.2.
[email protected] is for mainly for eslint 1, which is why there's a babel-eslint@6 beta for ESLint 2.
[Edit by hzoo]: If you are using ESLint 2, use [email protected]
Hi,
When I use babel-eslint with [email protected], the following error is thrown. But when I use [email protected], the error doesn't occur.
Error: Cannot find module 'estraverse-fb'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
I created a sample repository to reproduce this error. To reproduce, please checkout this repository and run npm install && npm test.
Environment:
[email protected] removed estraverse-fb and also changed how VisitorKeys are used, which babel-eslint patches to support flow, etc so we'll need to wait for an update.
For now, you'll have to pin to 2.2.x
Going to just error "Pin to ESLint 2.2.2" so the error is clearer, until this is fixed.
https://github.com/babel/babel-eslint/releases/tag/v6.0.0-beta.5
:+1:
Love it when people break stuff in a minor version.... thanks for the fix!
Apologies for the reference noise, was trying to fix a travis build error :x:
eslint 2.4.0 has been released just now -- I'll see if babel-eslint works on my end with the update.
Edit: I _think_ it's working now, can anyone else confirm? Nevermind, my dependency tree is messed up, so it was still using eslint 2.2. Installed 2.4, and it didn't seem to fix the problem, so I have no idea.
Pinned babel-eslint to 6.0.0-beta.3, reinstalled it and eslint 2.4.0 and it's working fine for me.
Pinned babel-eslint to 6.0.0-beta.3, reinstalled it and eslint 2.4.0 and it's working fine for me.
It's working fine for me too. But it seems the error still occurs. 6.0.0-beta.3 just catches it and do nothing, while 6.0.0-beta.5 throws the error properly with a clear message:
Error: babel-eslint isn't currently compatible with ESLint 2.3.x.
The recommendation is to pin to ESLint 2.2.x right now.
@ryym yep, you are right. Didn't notice that the error gets swallowed in 6.0.0-beta.3.
Maybe this tweet refers to something else then.
I'm also still getting the error after upgrading to eslint 2.4.0. Unfortunately comments are closed on https://github.com/eslint/eslint/issues/5476.
According to https://github.com/eslint/eslint/pull/5543#issuecomment-195963290, ESLint just enables babel-eslint to fix this error. So we need to wait for babel-eslint to update.
Hey everyone, I was out this weekend.
@ryym and others, I would test with [email protected].
I purposely made the 6.0 beta for compatibility with ESLint 2 (maybe I should just make it out of beta at this point since it seems that a lot of people are still using 5.0).
I could backport to 5.0 but it would probably just remove the error and result in other bugs (which would be fixed in 6.0)
@hzoo - We are still using babel 5.x in the ember-cli ecosystem, does babel-eslint@6 require babel 6, or are the versions just coincidentally the same?
Ref https://github.com/babel/babel-eslint/issues/254 (6.x.x for ESLint 2)
It's coincidentally the same, and it's just using babel 6 packages as dependencies rather than [email protected]. It shouldn't matter what the codebase's babel version is technically since all it's doing is parsing your code (if there are issues though let us know).
Maybe I should be clearer on this (if people aren't having any extra issues from before 2.3.0-2.4.0 with babel-eslint@6 I'll just remove the beta label).
@hzoo - Thanks for all the hard work on this! I will test in ember-cli-eslint / broccoli-lint-eslint. Will definitely let you know if we run into issues using babel-eslint@6.
I can confirm that the issue is gone using [email protected] and [email protected]. (Running it with Gulp if that matters)
Yep, npm i babel-eslint@next did it for me.
@hzoo Any place where we can track when [email protected] comes out of beta?
@karanjthakkar How do you propose we do that - just an issue for it? It's only in been in beta since it was my initial PR for ESLint compatibility.
I think just opening a checklist issue tracking what still needs to be done to get out of beta should be enough.
Anyone who wants to stay in the loop can then subscribe to that issue.
I don't think there's anything in particular (which probably shows it doesn't need to be in beta at this point I guess)
@hzoo Since its supporting [email protected] (which was the reason 6.x was created) and since there aren't any pending tasks that are blocking this change, I would say it should be taken out of beta and a stable major version be released.
@hzoo I confirmed [email protected] doesn't throw the error with [email protected].
Since there are no pending tasks anymore, should I close this issue (or wait for babel-eslint to come out of beta) ?
How about releasing a v5.0.1 with an "eslint": "<2.3.0" as a peer dependency?
This at least would protect people from installing incompatible versions.
Still have the problem with eslint 2.4.0
@zerkms sounds good. Although actually we might as well release it with eslint < 2.0.0 as a peer dependency since its for 1.0
Instead of installing an older eslint version you can just npm i --save-dev estraverse-fb and remove it once the issue fixed.
@tsm91 I don't recommend installing estraverse-fb because that just masks other potential errors. You should either stick with an older eslint version or just update to the latest babel-eslint
@zerkms Ok I think i'l release a patch for babel-eslint@5 to use eslint 1.
@hzoo i havent noticed any, yet
If it works for you then great; but I remember finding issues - although it's the nature of the tool (depends on the rules you use and the code you write)
Ok went ahead and made [email protected] to have a ESLint 1 peerDependency, and I moved babel-eslint@6 out of beta for ESLint 2!
with these rules it works
in my case it broke with an older version, because of an airbnb/base arrow function related rule
FWIW, I ran into the "Cannot find module 'estraverse-fb'" issue in a project I'm working on. Change to:
devDependencies:
"babel-eslint": "^4.1.8" --->
"babel-eslint": "^6.0.0"
did the trick for me.
Most helpful comment
@hzoo Any place where we can track when [email protected] comes out of beta?