-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Failed to compile - Failed to load config "react-app" to extend from #10463
Comments
I have this same issue without the typescript template
Running from PowerShell with Attempted fixes:
|
For me the same error happened when I was migrating my project to use Yarn 2. I was using the following guide: The command After checking eslint/eslint#13283 and installing Note: I'm not using typescript, but I believe that is unrelated to the real issue. |
@guludo Your response is spot on. I created a React app using |
Oh, and one more comment on this, I did not need to use |
The proposed solution
create-react-app already includes that and adding it should not be necessary. If not added, then still getting the
|
I solved it by adding |
I also solved this, but slightly differently; as I was similarly running into:
What I did was: yarn add -D eslint-config-react-app eslint@^8.0.0 instead of adding edit this also works: yarn add -D eslint-config-react-app eslint |
You will get varying results depending on whether you're using a classic The starting point has the error:
Which we can solve with:
But that leads to a new error:
As pointed out here, we can solve that in turn with a package extension in
|
Same issue here, i am using pnpm |
@LukeNotable That was a lifesaver, thank you for the detailed explanation and solution! Been looking for something that doesn't require downgrading anything. I additionally needed to do |
Plugin "react" was confilcted... 관련 에러 해결 링크 facebook/create-react-app#10463
Because "eslintConfig": { "extends": [ "react-app" ] } in package.json would result in the following error during build: "Failed to load config "react-app" to extend from.", eslint-config-react-app was added as an explicit devDependency. Because adding eslint-config-react-app as a devDependency led to react plugin having a conflict in eslint-config-react-app packages, the following was added to .yarnrc.yml packageExtensions: react-scripts@*: peerDependencies: eslint-config-react-app: "*" See the following for explanation of above two: facebook/create-react-app#10463 (comment) Becase @testing-library/jest-dom's types were recognized by build command, @types/testing-library__jest-dom was added as a devDependency.
* Mirror IDE dependencies in root package See step 2 of https://yarnpkg.com/getting-started/migration#editor-support * Align typescript version to 4.4.2 Because latest (^4.7.2) doesn't seem to work with yarn pnp module resolution * Upgrade nodeLinker to pnp * Add VSCode Editor SDK for yarn pnp See https://yarnpkg.com/getting-started/editor-sdks#vscode * Update client dependencies to enable build Because "eslintConfig": { "extends": [ "react-app" ] } in package.json would result in the following error during build: "Failed to load config "react-app" to extend from.", eslint-config-react-app was added as an explicit devDependency. Because adding eslint-config-react-app as a devDependency led to react plugin having a conflict in eslint-config-react-app packages, the following was added to .yarnrc.yml packageExtensions: react-scripts@*: peerDependencies: eslint-config-react-app: "*" See the following for explanation of above two: facebook/create-react-app#10463 (comment) Becase @testing-library/jest-dom's types were recognized by build command, @types/testing-library__jest-dom was added as a devDependency. * Update .yarnrc.yml with peerDependencies Because many packages in create-react-app rely on implicit peerDependencies, they need to be stated explicitly. See https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency for more info. * Update client package.json with devDependencies Because many top-level packages in create-react-app rely on implicit peerDependencies, they need to be stated explicitly. See https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency for more info. * Remove deps in root from server/package.json Because root workspace needs eslint, prettier, typescript in order to enable vscode dev tools (c.f. b3441de) - eslint can be removed from server/package.json - prettier can be removed from server/package.json - typescript can be removed from server/package.json In addition, jest, rimraf shoudl be common across all workspaces. To enable server workspace level commands that depended on rimraf, tsc, and jest, use guidance at https://yarnpkg.com/getting-started/qa#how-to-share-scripts-between-workspaces * Remove deps in root from common-api/package.json Because root workspace needs eslint, prettier, typescript in order to enable vscode dev tools (c.f. b3441de) - eslint can be removed from common-api/package.json - prettier can be removed from common-api/package.json - typescript can be removed from server/package.json In addition rimraf should be common across all workspaces. To enable server workspace level commands that depended on rimraf and tsc use guidance at https://yarnpkg.com/getting-started/qa#how-to-share-scripts-between-workspaces * Update root deps, yarnrc packageExtensions Because "ts-node-dev@npm:2.0.0 [5e2e0] doesn't provide @types/node (pc8aba), requested by ts-node" and "root-workspace-0b6124@workspace:. doesn't provide @types/node (pde784), requested by ts-node" * Use root cleanscript in client/package.json * Align client prettier to root * Align client test script to other packages * Run eslint/prettier across cli, server
@LukeNotable @vlmphipps Thanks a lot, that helped with with the issue :) |
Agreed thanks to @LukeNotable @vlmphipps, this fixed this problem.
EDIT: It's gone, I'm not even sure how I got rid of this problem. AS it was kinda persistent for a few days. |
I also had the TL;DR In my case, i could get another message by building after tried
I thought I should upgrade the I used |
Describe the bug
Create new react app with typescript template.
Following yarn start, no web page is loaded, error shows,
Failed to load config "react-app" to extend from.
Did you try recovering your dependencies?
No.
Which terms did you search for in User Guide?
"extend", "failed", "config"
Environment
npx create-react-app --info
Steps to reproduce
yarn set version berry
create-react-app onboard --template typescript
cd onboard/
yarn start
Expected behavior
React app start web page to display
Actual behavior
No 'start' web page successfully shown (browser displays error).
browser opened - showing same error output as terminal.
The text was updated successfully, but these errors were encountered: