Vscode-eslint: eslint can't not find the module "babel-eslint" when I have installed the module babel-eslint?

Created on 3 Jun 2016  路  9Comments  路  Source: microsoft/vscode-eslint

_From @fantasyKing on June 2, 2016 2:57_

Steps to Reproduce:

  1. I install the extension eslint for vsc,and write parser : "babel-eslint" after I have installed babel-eslint locally,but the eslint extension reminds me that can't find the module babel-eslint?

_Copied from original issue: Microsoft/vscode#7113_

Most helpful comment

You need to have both eslint and babel eslint installed either globally or locally. Mixing it will not work. See https://github.com/Microsoft/vscode-eslint/issues/2.

If this is not the case for you can you please share your workspace. I tried it locally and I can run eslint with babel-eslint installed.

All 9 comments

You need to have both eslint and babel eslint installed either globally or locally. Mixing it will not work. See https://github.com/Microsoft/vscode-eslint/issues/2.

If this is not the case for you can you please share your workspace. I tried it locally and I can run eslint with babel-eslint installed.

I'm also getting this issue on OSX. I don't have babel, babel-eslint, or eslint installed system wide.

Here's a repo that this happens in:

https://github.com/radiosilence/LintTest

Here's an LS of my _system_ node packages:

gulp
jscodeshift
mocha
node-dir
node-static
now
now-serve
npm
npm-check-updates
pouchdb-server
prettyjson
webpack
webpack-bundle-size-analyzer
webpack-dev-server

Works perfect if I do npm run lint.

@radiosilence thanks for the test case. Here is what I see using the workspace:

capture

The interesting finding is that aribnb plugin list eslint-plugin-jsx-a11y as a dev dependencies which doesn't install it when running npm install in the root.

Running npm run lint on a command line results in the same problem:

capture

@radiosilence any additional information / steps.

Did you run an npm install ? eslint-plugin-jsx-a11y is a dependency of the airbnb config.

@radiosilence yes I did. However I used node > 6.x which uses an npm version that doesn't install peer dependencies by default (eslint-plugin-jsx-a11y is listed as a dev and peer dependency in airbnb). Which node version are you using?

Here is what I see on npm install:

npm WARN peerDependencies The peer dependency eslint-plugin-jsx-a11y@^1.2.0 included from eslint-config-airbnb will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency eslint-plugin-import@^1.7.0 included from eslint-config-airbnb will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency eslint-plugin-import@^1.7.0 included from eslint-config-airbnb-base will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

Ah, I'm using node LTS (v4.4.5) at the moment. Perhaps I've pushed a fix that has eslint-plugin-jsx-a11y in the deps.

I will close this issue since there is nothing I can do. NPM doesn't install peer dependencies anymore and eslint-plugin-jsx-a11y is not listed as a normal dependency.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebastian-nowak picture sebastian-nowak  路  4Comments

JonathanWolfe picture JonathanWolfe  路  3Comments

wmertens picture wmertens  路  7Comments

jasonwilliams picture jasonwilliams  路  6Comments

ablakey picture ablakey  路  5Comments