-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing dependency eslint-config-react-app
?
#428
Comments
eslint-config-react-app
?
changed the title to reflect this. PR welcome |
Hi yes, this just started failing after a recent rm -rf node_modules and npm install. Something happened.
|
@fullstackwebdev oh dear. mind investigating further please? or file a different issue and link to this one since i'm not sure you have the exact same issue |
I'm configuring ESLint appears to require these to be installed in your project even if a dependency (like TSDX) installs them already, which is pretty tedious for certain things. |
is this the same problem? I think we can avoid this issue with creating a TSDX preset, as mentioned in #634 |
Yea that's probably the same root problem. A "shareable config" would still have the same issue -- the longstanding eslint/eslint#3458 is the root of all this I'm pretty sure. |
If you are using a monorepo with yarn workspace, try applying nohoist on tsdx
|
I think this issue is related as well: I guess as |
I faced similar problem.
|
Yeah this issue also bit me just now. The problem occurs because as soon as a different I guess if What do you think @sw-yx ? $ yarn lint
yarn run v1.22.10
warning ../package.json: No license field
$ tsdx lint
Defaulting to "tsdx lint src test"
You can override this in the package.json scripts, like "lint": "tsdx lint src otherDir"
/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:265
new Error(`Failed to load config "${configName}" to extend from.`),
^
Error: Failed to load config "prettier/@typescript-eslint" to extend from.
Referenced from: BaseConfig
at configMissingError (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:265:9)
at ConfigArrayFactory._loadExtendedShareableConfig (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:826:23)
at ConfigArrayFactory._loadExtends (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:731:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:660:25)
at _normalizeObjectConfigDataBody.next (<anonymous>)
at ConfigArrayFactory._normalizeObjectConfigData (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:596:20)
at _normalizeObjectConfigData.next (<anonymous>)
at createConfigArray (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:340:25)
at ConfigArrayFactory.create (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/config-array-factory.js:395:16)
at createBaseConfigArray (/Users/k/projects/upleveled/node_modules/tsdx/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:86:48) {
messageTemplate: 'extend-config-missing',
messageData: { configName: 'prettier/@typescript-eslint', importerName: '' }
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
A workaround that I am using for now is to use Yarn resolutions in {
"devDependencies": {
"eslint": "7.17.0"
},
"resolutions": {
"eslint": "7.17.0"
}
} Edit: This should also work with npm Overrides. |
@karlhorky yea resolutions are the best way to workaround this if you're installing an incompatible version. It is indeed because of the My plan with Presets (#634 ) was also to make it possible to opt-out of pieces of TSDX |
Nice, yeah I guess Presets would also get the job done in a different way. What are your thoughts on changing the |
Any update on this? I tried |
Same. also not really being able to get pass this, only ran into this today though. looks like other people ran into it much sooner. Adding the resolution to |
Same issue: Installing |
I added this particular version eslint-plugin-prettier and the problem seems to be fixed |
any updates on this? Facing the same issue |
This setup works, I use it all the time for my repos @ayush-seth |
npm -f i eslint-config-react-app when i run this command then it's resolved |
Facing same problem here , im stuck in the "TypeError [ERR_INVALID_ARG_VALUE]: Failed to load plugin 'prettier' declared in 'BaseConfig': The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '' This is my current package.json
|
Current Behavior
after updating in our monorepo we found that tsdx failed on:
After digging though both tsdx and eslint to figure out what went wrong
i found that if i add
eslint-config-react-app
to the project it workednpm install --save-dev eslint-config-react-app
now the project is a NONE react project and a really small helper project.
It seems to me that tsdx is missing its sub requirement for linting.
The text was updated successfully, but these errors were encountered: