eslint_d.js
eslint_d.js copied to clipboard
Debugging "Failed to load config"
I've had several instances lately where eslint works fine, but eslint_d reports Failed to load config "whatever" to extend from. These are shared configs that are loaded as npm modules. I hate writing a bad bug report, and I don't really have enough info to report an issue about the specifics, so... I'm reporting an issue about not being able to get enough info about the specifics. :-)
Is there anywhere to get additional details about this kind of path resolution failure?
$ ./node_modules/.bin/eslint src
/home/ehaynes99/tmp/sandbox/src/index.ts
1:17 error Delete `·` prettier/prettier
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
$ eslint_d src
Error: Failed to load config "erich" to extend from.
Referenced from: /home/erich/tmp/sandbox/.eslintrc.js
The references config is e.g.:
$ cat .eslintrc.js
module.exports = {
extends: ['erich'],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
}
The referenced config is present in node_modules/eslint-config-erich (https://www.npmjs.com/package/eslint-config-erich). This has happened with others, though. E.g. one of my projects at work references https://www.npmjs.com/package/eslint-plugin-etc as a plugin, and the same issue occurs.
Thanks for reporting. I made #87 quite some time ago since I had trouble fixing issues myself. It would be great to get some help implementing something like this.
Have the same issue on eslint ^8.*.*
P.S.
I delete ~/.eslint-d and restart eslint_d. It helps me to fix issue
Huh, I don't have a file of that name anywhere on my filesystem. I haven't encountered it again since I filed this, though. I still think more informative output would be helpful (though I guess it depends whether eslint actually emits anything more helpful :-) ). I'll try to come up with a PR for outputting more information when I get a chance, but I'm pretty swamped right now
Have the same issue on eslint
^8.*.*P.S. I delete
~/.eslint-dand restarteslint_d. It helps me to fix issue
this solved it for me too. although it would be interesting to know why it fixed the issue.
Had a similar issue with a Next.js 13 project where it would fail to load the config from eslint-config-next. Regular eslint worked fine, but for eslint_d running eslint_d stop and then reopening the project worked.
This is probably obsolete with the new major v14.0.0 (see #294). Should you're still having the issue, please write here and I'm happy to re-open.