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.

Error: Cannot find module '@typescript-eslint/eslint-plugin'

See original GitHub issue

Odd error in my EmberJs app that uses this linter. Dependabot just upgraded me from 1.0.1 to 1.0.3 and linting fails to load with the following error:

Error: Failed to load plugin 'unused-imports' declared in '.eslintrc.js': Cannot find module '@typescript-eslint/eslint-plugin'

I’ve got no direct dependencies to Typescript in this project. My .eslintrc.js is just bringing in the unused-imports plugin and setting these rules:

'use strict';

module.exports = {
  // ...
  plugins: ['ember', 'ember-suave', 'prettier', 'unused-imports'],
  // ...
  rules: {
    // ...
    'unused-imports/no-unused-imports': 2,
    'unused-imports/no-unused-vars': 1,
  },

Let me know if this information helps or if there’s something I can do to help out.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sweeplinecommented, Feb 8, 2021

Thanks, I published v 1.1.0

2reactions
enjoylifecommented, Feb 7, 2021

Seeing the same (I’m using flow). Its breaking because there is no conditional import on the ts specific rules,

module.exports.rules = requireIndex(__dirname + "/rules");

therefore its pulling in no-unused-imports-ts.js, which requires the package @typescript-eslint/eslint-plugin. And if your outside of the ts library package ecosystem you are not going to have it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not load plugin @ typescript-eslint: cannot find module ...
I reconfigure my project from tslint to eslint. I can start eslint manually, but the webpack does not start with this error message:...
Read more >
Cannot find module '@typescript-eslint/parser' when using ...
I discovered this by looking at the ESLint output in VSCode. The fix was to update one of my other dependencies (eslint-plugin-import).
Read more >
Cannot find module '@typescript-eslint/eslint-config' - YouTrack
Cannot find module '@typescript-eslint/eslint-config': unclear in what error refers.
Read more >
@typescript-eslint/eslint-plugin - npm
An ESLint plugin which provides lint rules for TypeScript codebases. 👉 See https://typescript-eslint.io/architecture/utils for our Getting ...
Read more >
typescript-eslint - Gitter
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: npm install @typescript-eslint/eslint-plugin@latest --save-dev ...
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