Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom throwing babel-eslint error constantly

At first, atom would throw this error if eslint was not saved as a dependency in a React project and it would pop up as a red notification. Now I am working in a directory that is not a git repo and it will incessantly launch this error whenever I try and type. Here's what I'm seeing:

Error: Cannot find module 'babel-eslint'
    at Object.ModuleResolver.resolve (/Users/josetello/.atom/packages/linter-eslint/node_modules/eslint/lib/util/module-resolver.js:75:19)

I've tried updating eslint/babel packages in atom, uninstalling them, looking around in the atom config file for hints as to what this might be, but no luck. It's driving me nuts - anyone else run into something similar?

like image 336
Jose Avatar asked Jan 06 '23 02:01

Jose


2 Answers

You may be able to fix this by changing directory to:

~/.atom/packages/linter-eslint/

Then running:

npm install babel-eslint

You will need to ensure that you have Node installed and npm in your path for the above to work. I also recommend reporting the issue as a defect on the projects GitHub repository.

like image 146
Richard Slater Avatar answered Jan 22 '23 22:01

Richard Slater


Try this setting:

You don't need to add babel-eslint as a dependency. Just check this setting in Atom.

like image 29
Seth Bergman Avatar answered Jan 22 '23 20:01

Seth Bergman