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.

Failed to load plugin 'import' declared in '.eslintrc » eslint-config-airbnb > Cannot find module 'eslint/lib/util/source-code'

See original GitHub issue

I am getting following error when Eslint plugin is running:

[Info - 07:43:14] ESLint library loaded from: c:\proj\node_modules\eslint\lib\api.js [Error - 07:43:25] Failed to load plugin ‘import’ declared in ‘.eslintrc » eslint-config-airbnb » C:\proj\node_modules\eslint-config-airbnb-base\index.js » C:\proj\node_modules\eslint-config-airbnb-base\rules\imports.js’: Cannot find module ‘eslint/lib/util/source-code’ Happened while validating C:\proj\src\Game\Game.jsx

"devDependencies": {
    "eslint": "^6.0.1",
    "eslint-config-airbnb": "^17.1.1",
    "eslint-plugin-import": "^2.18.0",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-jest": "^22.7.2",
    "eslint-plugin-react": "^7.14.2",
    "node-sass": "^4.12.0"
  },
$ yarn -v 1.13.0
$ npm -v 6.10.1
$ node v10.15.0

Project is done in react, and all packages are updated globally to most recent version.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Jul 15, 2019
0reactions
nicewaytodoitcommented, Jul 15, 2019

I have reversed now to “eslint”: “5.16.0”, “eslint-config-airbnb”: “^17.1.1”, And still getting same issue ?!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eslint > Failed to load plugin 'import' declared in '.eslintrc » ...
I am getting following error when Eslint plugin is running: [Info - 07:43:14] ESLint ... Cannot find module 'eslint/lib/util/source-code'
Read more >
Failed to load plugin 'import' declared in '... » eslint-config- ...
js This can happen for a couple of reasons: - The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc)....
Read more >
ESLint: Error: Failed to load plugin 'eslint-pliugin-import ...
Hi, I have this error with IntelliJ Idea 2020.3.3: ESLint: Error: ... declared in '--config': Cannot find module 'eslint-plugin-import' ...
Read more >
eslint-plugin-import
Start using eslint-plugin-import in your project by running `npm i ... .eslintrc.js module.exports = { settings: { 'import/resolver': { foo: ...
Read more >
eslint-config-airbnb
This package provides Airbnb's .eslintrc as an extensible shared config. Usage. We export three ESLint configurations for your usage. eslint-config-airbnb. Our ...
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