Failed to load plugin, Cannot find module "eslint/use-at-your-own-risk"
See original GitHub issueI’m having a problem with eslint_d being unable to load a plugin. In my case it’s @typescript/eslint-plugin but github issue search shows that this happens in some scenarios with other plugins. Here is the most relevant issue I could find: https://github.com/typescript-eslint/typescript-eslint/issues/4210
Here is the full error & stack:
Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:
- /Users/joseph/Sites/myProject/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js
- /Users/joseph/Sites/myProject/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
- /Users/joseph/Sites/myProject/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /Users/joseph/Sites/myProject/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /Users/joseph/Sites/myProject/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Running eslint_d some-file.ts causes this error, while yarn eslint some-file.ts works fine. (The latter command uses the locally installed eslint).
Here are my locally installed eslint packages:
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"eslint-config-next": "^12.0.7",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-native": "^4.0.0",
and eslint_d --version says: v7.32.0 (eslint_d v11.1.1)
I don’t really understand what’s going on here… is there any other info I can provide to help debug?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Failed to load plugin '@typescript-eslint', Cannot find module ...
npm start the following error is reported ERROR in [eslint] Failed to load plugin '@typescript-eslint' declared in 'package.json ...
Read more >VSCode failed to load plugin cannot find module 'eslint-plugin ...
i had the same issue. In your root workspace you have a .vscode folder with a settings.json . Add the following: { "eslint....
Read more >Using globally installed "standard" package causes "Cannot ...
Error : Failed to load plugin 'react' declared in '--config » eslint-config-standard-jsx': Cannot find module 'eslint-plugin-react' Require stack: ...
Read more >[eslint] failed to load plugin 'prettier' declared in '.eslintrc.json'
Error : Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.json': Cannot find module 'lodash/unescape' Require stack: ...
Read more >Stefan Spittank on Twitter: "Note to my future self: I just spent ...
... eslint failed for a new project with: Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json': Cannot find module ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you try
eslint_d restartand then callingeslint_d some-file.tsagain? Config changes are not always automatically detected in edge-case scenarios like this, and you might need to restart the daemon.I was having the exact same problem and this worked for me (: