import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.
MIT License
5.49k stars 1.57k forks source link

Error with eslint v6 - It seems that eslint is not loaded #1398

Closed popod closed 5 years ago

popod commented 5 years ago

Hi,

After update to eslint 6, I've this error:

eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix app test

Error: Failed to load plugin 'html' declared in '.eslintrc.js': eslint-plugin-html error: It seems that eslint is not loaded.
If you think this is a bug, please file a report at https://github.com/BenoitZugmeyer/eslint-plugin-html/issues

In the report, please include *all* those informations:

* ESLint version: 6.0.1
* ESLint path: /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/api.js
* Plugin version: 5.0.5
* Plugin inclusion paths: /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint-plugin-html/src/index.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/config-array-factory.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/cli-engine.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/index.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli.js, /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/bin/eslint.js
* NodeJS version: v12.4.0
* CLI arguments: ["/usr/local/bin/node","/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/.bin/eslint","--ext",".js,.vue","-f","./node_modules/eslint-friendly-formatter","--fix","app","test"]
* Content of your lock file (package-lock.json or yarn.lock) or the output of `npm list`
* How did you run ESLint (via the command line? an editor plugin?)
* The following stack trace:
    at iterateESLintModules (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint-plugin-html/src/index.js:98:7)
    at Object.<anonymous> (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint-plugin-html/src/index.js:25:1)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at ConfigArrayFactory._loadPlugin (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/config-array-factory.js:859:49)
    at /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/config-array-factory.js:730:33

    at iterateESLintModules (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint-plugin-html/src/index.js:83:11)
    at Object.<anonymous> (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint-plugin-html/src/index.js:25:1)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at ConfigArrayFactory._loadPlugin (/Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/config-array-factory.js:859:49)
    at /Users/username/Documents/Docusername/Projets/appname/Codes/Application/node_modules/eslint/lib/cli-engine/config-array-factory.js:730:33
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! appname@1.3.2 lint:fix: `eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix app test`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the appname@1.3.2 lint:fix script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2019-06-25T19_30_04_579Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! appname@1.3.2 postinstall: `npm run lint:fix && cd app && npm install`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the appname@1.3.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2019-06-25T19_30_04_660Z-debug.log

with this .eslintrc.js:

module.exports = {
  root: true,
  parser: 'babel-eslint',
  parserOptions: {
    sourceType: 'module'
  },
  env: {
    browser: true,
    node: true
  },
  extends: 'standard',
  plugins: [
    'html'
  ],
  settings: {
    'html/html-extensions': ['.html', '.vue'],
  }
}

I'm using electon and vue.

ljharb commented 5 years ago

You're getting an error with eslint-plugin-html, which isn't this repo. Please file it there.

popod commented 5 years ago

Hi, sorry and thanks for reply !