ESLint: Error: Failed to load plugin 'eslint-pliugin-import' declared in '--config': Cannot find module 'eslint-plugin-import'
Followed by 2 people
Hi,
I have this error with IntelliJ Idea 2020.3.3:
ESLint: Error: Failed to load plugin 'eslint-pliugin-import' declared in '--config': Cannot find module 'eslint-plugin-import'
I can see this error too:
Error: Failed to load plugin 'eslint-plugin-import' declared in '--config': Cannot find module 'eslint-plugin-import'
Require stack:
- C:\Projects\GS\myapp\__placeholder__.js
Error: Failed to load plugin 'eslint-plugin-import' declared in '--config': Cannot find module 'eslint-plugin-import'
Require stack:
- C:\Projects\GS\myapp\__placeholder__.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.resolve (internal/modules/cjs/helpers.js:83:19)
at Object.resolve (C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\shared\relative-module-resolver.js:28:50)
at ConfigArrayFactory._loadPlugin (C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\config-array-factory.js:1017:39)
at C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\config-array-factory.js:908:33
at Array.reduce (<anonymous>)
at ConfigArrayFactory._loadPlugins (C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\config-array-factory.js:904:22)
at ConfigArrayFactory._normalizeObjectConfigDataBody (C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\config-array-factory.js:725:44)
at _normalizeObjectConfigDataBody.next (<anonymous>)
at ConfigArrayFactory._normalizeObjectConfigData (C:\Projects\GS\myapp\node_modules\@eslint\eslintrc\lib\config-array-factory.js:665:20)
Process finished with exit code -1
These are the eslintrc and the tsconfig file I'm using now.
Which could be the problem?
Thank you
Please sign in to leave a comment.
Does ESLint work if you run it in terminal? Is it installed locally or globally?
Please share a screenshot of Settings | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint page and your package.json
Hi Elena,
it is installed both globally and locally, but I'm using the local one (the one in node:modules).
How can I test it from the terminale.
These are the the screenshots and the file that you asked for: Download.
cld
>How can I test it from the terminale.
open the built-in terminal and run eslint . there
>These are the the screenshots and the file that you asked for: Download.
access is denied:(