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

Cannot find module 'escope' #479

Closed
coljung opened this issue May 31, 2017 · 7 comments
Closed

Cannot find module 'escope' #479

coljung opened this issue May 31, 2017 · 7 comments

Comments

@coljung
Copy link

coljung commented May 31, 2017

Currently getting this error when i try to run eslint locally:

Error: Cannot find module 'escope'
    at Function.Module._resolveFilename (module.js:455:15)
    at monkeypatch (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:53:26)
    at Object.exports.parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:358:5)
    at parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:671:23)
    at Linter.verify (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:806:27)
    at processText (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:278:31)
    at processFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:320:18)
    at executeOnFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:655:25)
    at fileList.forEach.fileInfo (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:693:13)
    at Array.forEach (native)

What's weird is that im using the same linting configuration with another project, and i had no issues at all.

I'm using:
babel-eslint@7.1.1
eslint@4.0.0-beta.0

Any ideas ?

@kentcdodds
Copy link
Member

Sorry, I don't know. But if you could reproduce this in another small repo that'd be great :)

@soda0289
Copy link
Contributor

You should try to update babel-eslint. ESLint v4 uses a new fork of escope called eslint-scope. babel-eslint v7.2.2 should contain this PR #461 which checks for both

@coljung
Copy link
Author

coljung commented May 31, 2017

Yes, just noticed one of my projects was using 7.1.1 while the other was using 7.2.3

@coljung
Copy link
Author

coljung commented May 31, 2017

That was it, thanks!

@maxmantz
Copy link

Having the same issue using babel-eslint@7.2.3 & eslint@4.4.1

@maxmantz
Copy link

Nevermind, clearing my global npm cache and reinstalling resolved the issue.

@hzoo
Copy link
Member

hzoo commented Aug 10, 2017

Cool, and latest eslint should be using a different package now anyway. going to lock

@babel babel locked and limited conversation to collaborators Aug 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants