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-cypress"

See original GitHub issue

When using VSCODE plugin or globally via eslint /Users/jeffbeltran/work/lassie/cypress/integration/sample_spec.j

output:

Oops! Something went wrong! :(

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

1. If ESLint is installed globally, then make sure eslint-plugin-cypress 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-cypress@latest --save-dev

Path to ESLint package: /usr/local/lib/node_modules/eslint

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
chrisbreidingcommented, Aug 27, 2019

There’s only a need to install this plugin globally if you have eslint installed globally and you’re trying to run it globally (eslint *.js). If you have both eslint and eslint-plugin-cypress installed locally and run it locally (./node_modules/.bin/eslint *.js, npx eslint *.js, etc), there should be no problem.

As far as I know, there’s nothing we as plugin authors can do about this. It’s how eslint works. If you run eslint globally, it can’t find locally installed plugins.

So to reiterate, the solutions for this are one of the following:

  • Install and run eslint locally

    - or -

  • Install eslint-plugin-cypress globally, then you can use the global eslint

3reactions
jennifer-shehanecommented, Apr 16, 2019

Hey @JeffBeltran, @Lukavyi, did you try the recommended workarounds in the error message? Which one did you try and what was the outcome of following them?

  1. If ESLint is installed globally, then make sure eslint-plugin-cypress 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-cypress@latest --save-dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-cypress - npm
An ESLint plugin for projects using Cypress. Latest version: 2.12.1, last published: a year ago. Start using eslint-plugin-cypress in your ...
Read more >
eslint/eslint - Gitter
A globally-installed ESLint cannot find a locally-installed plugin. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly.
Read more >
Failed to load plugin 'cypress' declared in 'package.json ...
Heroku deployment failing: Failed to load plugin 'cypress' declared in 'package.json': Cannot find module 'eslint-plugin-cypress' · Ask Question.
Read more >
Shareable Configs - ESLint - Pluggable JavaScript Linter
If your shareable config depends on a plugin, you should also specify it as a peerDependency (plugins will be loaded relative to the...
Read more >
eslint-plugin-cypress - npm Package Health Analysis - Snyk
An ESLint plugin for projects using Cypress. Visit Snyk Advisor to see a full health score report for eslint-plugin-cypress, including popularity, security, ...
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