Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

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

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

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

ryym opened this issue Mar 5, 2016 · 35 comments

Comments

@ryym
Copy link

ryym commented Mar 5, 2016

### [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
@unindented
Copy link

Related: eslint/eslint#5476

@hzoo
Copy link
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 added a commit to istarkov/babel-plugin-webpack-loaders that referenced this issue Mar 6, 2016
stephengfriend added a commit to stephengfriend/este that referenced this issue Mar 6, 2016
stephengfriend added a commit to stephengfriend/cmsbl that referenced this issue Mar 6, 2016
Pins eslint to 2.2.0 - babel/babel-eslint#267
Overrides react/prefer-stateless-functions
mistadikay added a commit to rebem/enzyme that referenced this issue Mar 7, 2016
mistadikay added a commit to rebem/test-utils that referenced this issue Mar 7, 2016
nkt pushed a commit to actorapp/actor-platform that referenced this issue Mar 7, 2016
umbobabo pushed a commit to umbobabo/react-i13n-piano that referenced this issue Mar 7, 2016
Baggz pushed a commit to apiaryio/attributes-kit that referenced this issue Mar 8, 2016
@hzoo
Copy link
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

tgriesser added a commit to bookshelf/bookshelf that referenced this issue Mar 9, 2016
istarkov added a commit to istarkov/html-hint that referenced this issue Mar 9, 2016
hammeiam added a commit to hammeiam/tree_browser that referenced this issue Mar 19, 2016
jfhamlin pushed a commit to ShelterTechSF/askdarcel-web that referenced this issue Mar 21, 2016
Signed-off-by: James Hamlin <jfhamlin@cotap.com>
crysislinux pushed a commit to web-plasma5/web-plasma5 that referenced this issue Mar 21, 2016
parmentf added a commit to Inist-CNRS/node-jbj-rdfa that referenced this issue Mar 21, 2016
noriaki added a commit to noriaki/react-redux-tutoreal that referenced this issue Mar 22, 2016
keithamus added a commit to packagesmith/packagesmith.questions.description that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/packagesmith.questions.license that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/packagesmith.questions.name that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/packagesmith.questions.repository that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/provision-gitignore that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/provision-stylelint that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
keithamus added a commit to packagesmith/packagesmith that referenced this issue Mar 23, 2016
Fix eslint to ~2.2.0 to ensure it does not cause errors. See
babel/babel-eslint#267 for more
bettiolo added a commit to bettiolo/babel-preset-es2017 that referenced this issue Mar 24, 2016
@aegyed91
Copy link

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

@hzoo
Copy link
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
Copy link
Member

hzoo commented Mar 26, 2016

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

@aegyed91
Copy link

@hzoo i havent noticed any, yet

@hzoo
Copy link
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
Copy link
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!

@aegyed91
Copy link

with these rules it works

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

jfhamlin pushed a commit to ShelterTechSF/askdarcel-web that referenced this issue Apr 3, 2016
Signed-off-by: James Hamlin <jfhamlin@cotap.com>
@danez danez closed this as completed Apr 23, 2016
@whatevernot
Copy link

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.

@babel babel 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.
Projects
None yet
Development

No branches or pull requests