Error with eslint@2.3.0: Cannot find module 'estraverse-fb' #267

Closed
ryym opened this Issue Mar 5, 2016 · 35 comments

Projects

None yet
@ryym
ryym commented Mar 5, 2016 edited

### [Edit by hzoo] - if you are experiencing this error, pin to ESLint 2.2.2.

babel-eslint@5.x.x 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 babel-eslint@6.x.x


Hi,

When I use babel-eslint with eslint@2.3.0, the following error is thrown. But when I use eslint@2.2.0, 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:

  • babel-eslint@5.0.0
  • eslint@2.3.0
@hzoo hzoo added bug eslint labels Mar 5, 2016
@hzoo
Member
hzoo commented Mar 5, 2016

ESLint@2.3.0 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

@istarkov istarkov added a commit to istarkov/babel-plugin-webpack-loaders that referenced this issue Mar 6, 2016
@istarkov istarkov set eslint version to "~2.2.0" 4a9aae0
@stephengfriend stephengfriend added a commit to stephengfriend/cmsbl that referenced this issue Mar 6, 2016
@stephengfriend stephengfriend Updates some initial configuration
Pins eslint to 2.2.0 - babel/babel-eslint#267
Overrides react/prefer-stateless-functions
6a9413c
@mistadikay mistadikay added a commit to rebem/enzyme that referenced this issue Mar 7, 2016
@mistadikay mistadikay 👾 eslint fix (babel/babel-eslint#267) 5d702f0
@mistadikay mistadikay added a commit to rebem/test-utils that referenced this issue Mar 7, 2016
@mistadikay mistadikay 👾 eslint fix (babel/babel-eslint#267) 3c8d91e
@nkt nkt added a commit to actorapp/actor-platform that referenced this issue Mar 7, 2016
@nkt nkt chore(web): lock eslint version to 2.2.x e5f4b8c
@umbobabo umbobabo added a commit to umbobabo/react-i13n-piano that referenced this issue Mar 7, 2016
@umbobabo umbobabo chore: fix eslint issue babel/babel-eslint#267 6c3a163
@hzoo
Member
hzoo commented Mar 8, 2016

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

@akfish akfish added a commit to akfish/hexo-responsive-image that referenced this issue Mar 8, 2016
@akfish akfish Use async/await in processor workflow
* Update babel config
* Update standard config
* Use eslint@2.2.0 due to babel/babel-eslint#267
3f1c5e2
@tgriesser tgriesser added a commit to tgriesser/bookshelf that referenced this issue Mar 9, 2016
@tgriesser tgriesser Pin ESLint 2.2
Until babel/babel-eslint#267 is fixed.
6ba28f5
@istarkov istarkov added a commit to istarkov/html-hint that referenced this issue Mar 9, 2016
@istarkov istarkov Pin eslint to ~2.2.0 e016de9
@budde377
budde377 commented Mar 9, 2016

👍

@micaelmbagira micaelmbagira added a commit to FountainJS/generator-fountain-eslint that referenced this issue Mar 9, 2016
@micaelmbagira micaelmbagira Workaround to fix babel/babel-eslint#267 37e2606
@zackify
zackify commented Mar 9, 2016

Love it when people break stuff in a minor version.... thanks for the fix!

@andrew-d andrew-d pushed a commit to andrew-d/raku that referenced this issue Mar 10, 2016
@adunham-stripe adunham-stripe Downgrade eslint until babel/babel-eslint#267 is fixed 2a8354a
@benmosher benmosher added a commit to benmosher/eslint-plugin-import that referenced this issue Mar 11, 2016
@benmosher benmosher pinned dev deps to eslint 2.2.x until babel/babel-eslint#267 is resol…
…ved.
1497aa8
@thedark1337 thedark1337 added a commit to thedark1337/eslint-config-thedark1337 that referenced this issue Mar 11, 2016
@thedark1337 thedark1337 Update: pin eslint to 2.2.x until babel-eslint is fixed 1a08cc2
@thedark1337 thedark1337 added a commit to thedark1337/eslint-config-thedark1337 that referenced this issue Mar 11, 2016
@thedark1337 thedark1337 Update: pin ESLint to 2.2.x. update multiple deps
Pin ESLint 2.x until babel/babel-eslint#267 is fixed. Update unexpected to latest version. Babel-eslint to latest version. lodash.merge to latest version
a0babe0
@thedark1337 thedark1337 added a commit to thedark1337/eslint-config-thedark1337 that referenced this issue Mar 11, 2016
@thedark1337 thedark1337 Update: pin ESLint to 2.2.x. update multiple deps
Pin ESLint 2.2.x until babel/babel-eslint#267 is fixed. Update unexpected to latest version. Babel-eslint to latest version. lodash.merge to latest version
0f5a794
@thedark1337

Apologies for the reference noise, was trying to fix a travis build error

@jaredkotoff jaredkotoff referenced this issue in iam4x/isomorphic-flux-boilerplate Mar 11, 2016
Closed

Fix error with updating eslint #263

@SEAPUNK
SEAPUNK commented Mar 11, 2016

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.

@le0nik
le0nik commented Mar 11, 2016

Pinned babel-eslint to 6.0.0-beta.3, reinstalled it and eslint 2.4.0 and it's working fine for me.

@ryym
ryym commented Mar 12, 2016

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.
@steida steida referenced this issue in este/este Mar 12, 2016
Closed

Pinned eslint 2.2.0 #770

@le0nik
le0nik commented Mar 12, 2016

@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.

@camjackson

I'm also still getting the error after upgrading to eslint 2.4.0. Unfortunately comments are closed on eslint/eslint#5476.

@meriadec meriadec added a commit to SIGSEV/minus that referenced this issue Mar 13, 2016
@meriadec meriadec chore(deps): update deps
eslint pinned to 2.2.0. Plz, don't update until
babel/babel-eslint#267
is resolved
c45605b
@Izzimach Izzimach added a commit to Izzimach/react-three that referenced this issue Mar 13, 2016
@Izzimach Izzimach Pin eslint to 2.2.0 per babel/babel-eslint#267 fe55066
@BrianSipple BrianSipple referenced this issue in ember-cli/broccoli-lint-eslint Mar 14, 2016
Closed

Pin ESLint dependency to 2.2.0 #23

@ryym
ryym commented Mar 14, 2016

According to eslint/eslint#5543 (comment), ESLint just enables babel-eslint to fix this error. So we need to wait for babel-eslint to update.

@hzoo
Member
hzoo commented Mar 14, 2016

Hey everyone, I was out this weekend.

@ryym and others, I would test with babel-eslint@6.0.0-beta.6.

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)

@rwjblue
Member
rwjblue commented Mar 14, 2016

@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?

@hzoo
Member
hzoo commented Mar 14, 2016

Ref #254 (6.x.x for ESLint 2)

It's coincidentally the same, and it's just using babel 6 packages as dependencies rather than babel-core@5.x. 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).

@rwjblue
Member
rwjblue commented Mar 14, 2016

@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.

@flekschas

I can confirm that the issue is gone using babel-eslint@6.0.0-beta.6 and eslint@2.4.0. (Running it with Gulp if that matters)

@flekschas flekschas added a commit to flekschas/d3-list-graph that referenced this issue Mar 14, 2016
@flekschas flekschas Explicitly use eslint v2.4.0 and babel-eslint v6.0.0-beta6 which solves
babel/babel-eslint#267. Remove weird whitespaces.
89765be
@jeffijoe

Yep, npm i babel-eslint@next did it for me.

@eikeon eikeon added a commit to LibraryOfCongress/bagger-js that referenced this issue Mar 14, 2016
@eikeon eikeon Updated re: babel/babel-eslint#267 1faaf49
@eikeon eikeon added a commit to LibraryOfCongress/bagger-js that referenced this issue Mar 14, 2016
@eikeon eikeon Updated re: babel/babel-eslint#267 d0d91ea
@eikeon eikeon added a commit to LibraryOfCongress/bagger-js that referenced this issue Mar 14, 2016
@eikeon eikeon Updated re: babel/babel-eslint#267 3a84655
@eikeon eikeon referenced this issue in LibraryOfCongress/bagger-js Mar 14, 2016
Merged

Cleaning up / adding Redux #31

7 of 7 tasks complete
@carlbennettnz carlbennettnz added a commit to carlbennettnz/json-api that referenced this issue Mar 14, 2016
@carlbennettnz carlbennettnz Update eslint and friends
eslint@latest and babel-eslint@latest are currently incompatible and so
I have pinned eslint@2.2 for now, as per the advice in
babel/babel-eslint#267
c6ce8eb
@KanoYugoro KanoYugoro referenced this issue in jira-node/node-jira-client Mar 15, 2016
Merged

Eslint update #33

@karanjthakkar

@hzoo Any place where we can track when babel-eslint@6.x.x comes out of beta?

@ufocoder ufocoder referenced this issue in ufocoder/redux-universal-boilerplate Mar 15, 2016
Closed

Lint command running error #1

@straku straku added a commit to straku/react-boilerplate that referenced this issue Mar 15, 2016
@straku straku Update packages
Sticking to ESLint 2.2.0 because of the issue
babel/babel-eslint#267
423872d
@hzoo
Member
hzoo commented Mar 16, 2016

@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.

@tikotzky

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.

@hzoo
Member
hzoo commented Mar 16, 2016

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)

@ltegman ltegman referenced this issue in freeCodeCamp/freeCodeCamp Mar 16, 2016
Closed

Update eslint to version 2.4.0 🚀 #7506

@micaelmbagira micaelmbagira added a commit to FountainJS/generator-fountain-eslint that referenced this issue Mar 17, 2016
@micaelmbagira micaelmbagira Remove workaround and update eslint/babel-eslint to solve 'estraverse… efa96ac
@karanjthakkar

@hzoo Since its supporting eslint@2.x (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.

@ryym
ryym commented Mar 18, 2016

@hzoo I confirmed babel-eslint@6.0.0-beta.6 doesn't throw the error with ESLint@2.4.0.
Since there are no pending tasks anymore, should I close this issue (or wait for babel-eslint to come out of beta) ?

@zerkms
zerkms commented Mar 18, 2016

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.

@ngerritsen

Still have the problem with eslint 2.4.0

@hzoo
Member
hzoo commented Mar 18, 2016

@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

@hammeiam hammeiam added a commit to hammeiam/tree_browser that referenced this issue Mar 19, 2016
@hammeiam hammeiam new eslint release is broken, update package.json to rely on older on…
…e. For more details see babel/babel-eslint#267
a694bd0
@jfhamlin jfhamlin pushed a commit to ShelterTechSF/askdarcel-web that referenced this issue Mar 21, 2016
James Hamlin Work around babel/babel-eslint#267
Signed-off-by: James Hamlin <jfhamlin@cotap.com>
0d8b723
@crysislinux crysislinux added a commit to web-plasma5/web-plasma5 that referenced this issue Mar 21, 2016
@crysislinux crysislinux stick to eslint 2.2 to avoid a bug. see babel/babel-eslint#267 85ed49b
@KanoYugoro KanoYugoro referenced this issue in TWExchangeSolutions/jira-precommit-hook Mar 21, 2016
Merged

Use update-notifier for the update check to make hook faster #92

@parmentf parmentf added a commit to Inist-CNRS/node-jbj-rdfa that referenced this issue Mar 21, 2016
@parmentf parmentf 💚 Fix eslint version. b7c3fe5
@noriaki noriaki added a commit to noriaki/react-redux-tutoreal that referenced this issue Mar 22, 2016
@noriaki noriaki fix version babel-eslint 5.X.X to 6.X.X-beta, 4bcfab7
@marten-de-vries marten-de-vries referenced this issue in pouchdb/pouchdb-plugin-helper Mar 22, 2016
Closed

lint command started failing #10

@asendia asendia added a commit to traveloka/marlint that referenced this issue Mar 23, 2016
@asendia asendia Temporarily lock eslint dependency to 2.2.0 9312e89
@asendia asendia referenced this issue in traveloka/marlint Mar 23, 2016
Merged

Temporarily lock eslint dependency to 2.2.0 #2

@keithamus keithamus added a commit to packagesmith/packagesmith.questions.description that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
f6884a9
@keithamus keithamus added a commit to packagesmith/packagesmith.questions.license that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
12eca0a
@keithamus keithamus added a commit to packagesmith/packagesmith.questions.name that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
99a2be9
@keithamus keithamus added a commit to packagesmith/packagesmith.questions.repository that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
ea22e47
@keithamus keithamus added a commit to packagesmith/provision-gitignore that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
b70a31d
@keithamus keithamus added a commit to packagesmith/provision-stylelint that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
785dcd0
@keithamus keithamus added a commit to packagesmith/packagesmith that referenced this issue Mar 23, 2016
@keithamus keithamus chore: update dependencies
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
976230f
@bettiolo bettiolo added a commit to bettiolo/babel-preset-es2017 that referenced this issue Mar 24, 2016
@bettiolo bettiolo Fixed broken eslint dependency as per 5d491b5
@tsm91
tsm91 commented Mar 24, 2016

Instead of installing an older eslint version you can just npm i --save-dev estraverse-fb and remove it once the issue fixed.

@steelbrain steelbrain referenced this issue in steelbrain/atom-linter Mar 24, 2016
Merged

Cleanup API in README #127

@hzoo
Member
hzoo commented Mar 26, 2016

@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

@hzoo
Member
hzoo commented Mar 26, 2016

@zerkms Ok I think i'l release a patch for babel-eslint@5 to use eslint 1.

@tsm91
tsm91 commented Mar 26, 2016

@hzoo i havent noticed any, yet

@hzoo
Member
hzoo commented Mar 26, 2016

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)

@hzoo
Member
hzoo commented Mar 26, 2016

Ok went ahead and made babel-eslint@5.0.1 to have a ESLint 1 peerDependency, and I moved babel-eslint@6 out of beta for ESLint 2!

@tsm91
tsm91 commented Mar 26, 2016

with these rules it works

in my case it broke with an older version, because of an airbnb/base arrow function related rule

@jfhamlin jfhamlin pushed a commit to ShelterTechSF/askdarcel-web that referenced this issue Apr 3, 2016
James Hamlin Work around babel/babel-eslint#267
Signed-off-by: James Hamlin <jfhamlin@cotap.com>
b3d8350
@danez danez closed this Apr 23, 2016
@whatevernot

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.

@hzoo hzoo locked and limited conversation to collaborators May 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.