standardx: Error: Failed to load config "standard" to extend from.
What version of this package are you using?
5.0.0 (standard 14.3.1)
What operating system, Node.js, and npm version?
Manjaro KDE, Node v13.5.0, npm v6.13.4
What happened?
- Installed standardx with
sudo npm install standardx --global - Executed
standardx --fixin my local project folder. - The program terminated with this error:
standardx: Unexpected linter output:
Error: Failed to load config "standard" to extend from.
Referenced from: BaseConfig
at configMissingError (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:233:9)
at ConfigArrayFactory._loadExtendedShareableConfig (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:712:23)
at ConfigArrayFactory._loadExtends (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:617:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:547:25)
at _normalizeObjectConfigDataBody.next (<anonymous>)
at ConfigArrayFactory._normalizeObjectConfigData (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:491:20)
at _normalizeObjectConfigData.next (<anonymous>)
at createConfigArray (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:307:25)
at ConfigArrayFactory.create (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/config-array-factory.js:362:16)
at createBaseConfigArray (/usr/lib/node_modules/standardx/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:84:48)
If you think this is a bug in `standardx`, open an issue: https://github.com/standard/standardx/issues
What did you expect to happen?
To run the autofixer.
Are you willing to submit a pull request to fix this bug?
I’m not familiar with the code, so I don’t think I could.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 26
- Comments: 25 (3 by maintainers)
Commits related to this issue
- Switch to standard style formatting, but using prettier because standard's typescript support is wonky See https://github.com/standard/standardx/issues/27 — committed to gadget-inc/fastify-passport by airhorns 4 years ago
- Switch to standard style formatting, but using prettier because standard's typescript support is wonky See https://github.com/standard/standardx/issues/27 — committed to fastify/fastify-passport by airhorns 4 years ago
- resolve eslint config and plugins manually fixes #27 — committed to standard/standardx by Flet 3 years ago
- fix: fix random eslint-errors when code-formating https://github.com/standard/standardx/issues/27#issuecomment-674091300 — committed to tonitone/placeholder-image-service by tonitone 3 years ago
- fix: fix random eslint-errors when code-formating https://github.com/standard/standardx/issues/27#issuecomment-674091300 — committed to tonitone/placeholder-image-service by tonitone 3 years ago
I got this issue today and solved it by installing the following packages:
npm install eslint --save-dev npm install eslint-config-standard --save-dev npm install eslint-config-standard-jsx --save-dev npm install eslint-plugin-react --save-dev npm install eslint-plugin-import --save-dev npm install eslint-plugin-node --save-dev npm install eslint-plugin-promise --save-dev npm install eslint-plugin-standard --save-dev
@ManuelFte @indigoviolet In the meantime of that wrong configuration of eslint, I could resolve fallback of version
3.0.0of standardx.That’s all
Extra tip:
I was having some problems with paths, etc… so I ended to add a script to my
package.jsonfile.and finally, just be sure that you are importing the rest of configurations that are described here
That’s it, then It’s working as I expected. 😃
Hello! 👋
I was able to get something working that resolves this issue in PR #38.
Sanity checks by interested folks here would be cool!
Yes.
Apparently the error comes from the fact that ESLint v6 now demands that all plugins are installed locally as seen here and here. Replacing the
eslintpackage instandardx/node_moduleswitheslint@5.16.0and reverting toecmaVersion: 2019instandardx/node_modules/eslint-config-standard/eslintrc.jsonandstandardx/node_modules/eslint-config-standard-jsx/eslintrc.jsonfixed it for me. Not the ideal solution but at least I can use my customizations now.I tried with another a new project and am hitting the same problem. So is it the case that no one is using latest standardx to add typescript support to standard?
Any news on this? Is it at all possible to have a working global installation of standardx?
Also ended up installing thse packages that made it work (although I don’t need most of them - in theory)
I used standardx 3.0.0 because reasons 😦