question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EsLint couldn't find the plugin "eslint-plugin-html"

See original GitHub issue

Description

There’s an error when run yarn run lint or npm run lint:

EsLint couldn't find the plugin "eslint-plugin-html".

Steps to reproduce

  • Clone react-boilerplate project with command git clone --depth=1 https://github.com/react-boilerplate/react-boilerplate.git
  • Run command to setup: npm run setup
  • Enter to remove old repo
  • Run linting: yarn run lint then get issue below:
$ yarn run lint
yarn run v1.5.1
$ npm run lint:js

> react-boilerplate@3.5.0 lint:js /Users/dungla4/workspace/app-react-boilerplate
> npm run lint:eslint -- .


> react-boilerplate@3.5.0 lint:eslint /Users/dungla4/workspace/app-react-boilerplate
> eslint --ignore-path .gitignore --ignore-pattern internals/scripts "."


Oops! Something went wrong! :(

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-html is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-html@latest --save-dev

Actually we don’t use eslint-plugin-html for react project, this error is too strange. However I try to install eslint-plugin-html (latest is 4.0.2) After installing, I got another issue:

$ yarn run lint
yarn run v1.5.1
$ npm run lint:js

> react-boilerplate@3.5.0 lint:js /Users/dungla4/workspace/app-react-boilerplate
> npm run lint:eslint -- .


> react-boilerplate@3.5.0 lint:eslint /Users/dungla4/workspace/app-react-boilerplate
> eslint --ignore-path .gitignore --ignore-pattern internals/scripts "."

eslint-plugin-html error: It seems that eslint is not loaded. If you think it is a bug, please file a report at https://github.com/BenoitZugmeyer/eslint-plugin-html/issues
Error: eslint-plugin-html error: It seems that eslint is not loaded. If you think it is a bug, please file a report at https://github.com/BenoitZugmeyer/eslint-plugin-html/issues
    at iterateESLintModules (/Users/dungla4/workspace/app-react-boilerplate/node_modules/eslint-plugin-html/src/index.js:65:11)
    at Object.<anonymous> (/Users/dungla4/workspace/app-react-boilerplate/node_modules/eslint-plugin-html/src/index.js:26:1)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.load (/Users/dungla4/workspace/app-react-boilerplate/node_modules/eslint/lib/config/plugins.js:129:26)

Versions

  • React-Boilerplate (see package.json): 3.5.0
  • Node/NPM: v9.10.1/5.6.0
  • Browser: N/A

I also tried to downgrade node to v8 but same error There’s no eslint global (yarn and npm)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Apr 5, 2018

I found the root cause 😦 There’s an .eslintrc in parent folder of my project. That’s why eslint always notify error. After deleting file, everything is ok. Close this issue. Thank you very much @gretzky

0reactions
lock[bot]commented, May 28, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint"
Missing . eslintrc config file from the project folder. Solution: npx eslint --init. Additional node_modules folder in the project-parent ...
Read more >
eslint/eslint - Gitter
ESLint couldn't find the plugin "eslint-plugin-react-hooks". This can happen for a couple different reasons: 1. If ESLint is installed globally, then make sure ......
Read more >
eslint-plugin-html - npm
This plugin focuses on applying ESLint rules on inline scripts contained in HTML. It does not provide any rule related to HTML. For...
Read more >
Working with Plugins - ESLint - Pluggable JavaScript Linter
To use the rule in ESLint, you would use the unprefixed plugin name, followed by a slash, followed by the rule name. So...
Read more >
User Guide | eslint-plugin-vue
Make sure you don't have eslint-plugin-html in your config. The eslint-plugin-html extracts ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found