Cannot find module 'babel-eslint' (both standard and babel-eslint already installed locally)

Inovramadani picture Inovramadani · Mar 15, 2019 · Viewed 20.6k times · Source

What version of standard?

12.0.1

What operating system, Node.js, and npm version?

Windows 10, Node v10.15.1, NPM v.6.8.0

What did you expect to happen?

  • I install both standard and babel-eslint on devDependencies (locally).
  • I run standard --parser babel-eslint
  • I get the standard use babel-eslint parser to recognize babel code style and not stating it as style error

What actually happened?

  • I install both standard and babel-eslint on devDependencies (locally).

  • I run standard --parser babel-eslint

  • I get error: Cannot find module 'babel-eslint'

I read from previous issues 85 1167, it should be fixed when they are installed on the same level. But it does not happen on mine.

I have tried to put config below on package.json:

"standard": {
    "parser": "babel-eslint"
  }

But it does not resolve the issue.

Answer

Nalan Madheswaran picture Nalan Madheswaran · Aug 29, 2019

Try

$yarn add standard babel-eslint