Skip to content
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

(react-scripts) Support for TypeScript 5.x #13080

Open
Torniojaws opened this issue Mar 22, 2023 · 43 comments
Open

(react-scripts) Support for TypeScript 5.x #13080

Torniojaws opened this issue Mar 22, 2023 · 43 comments

Comments

@Torniojaws
Copy link

Describe the bug

After npx create-react-app frontend --template typescript, when you update package.json to use "typescript": "^5.0.2",, npm install <any package> fails with this error:

$ npm i react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-scripts@5.0.1
npm ERR! Found: typescript@5.0.2
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"5.0.1" from the root project
npm ERR!   peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from tsutils@3.21.0
npm ERR!   node_modules/tsutils
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!     node_modules/@typescript-eslint/eslint-plugin
npm ERR!       @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!       node_modules/eslint-config-react-app
npm ERR!         eslint-config-react-app@"^7.0.1" from react-scripts@5.0.1
npm ERR!         node_modules/react-scripts
npm ERR!       3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/type-utils@5.55.0
npm ERR!     node_modules/@typescript-eslint/type-utils
npm ERR!       @typescript-eslint/type-utils@"5.55.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!       node_modules/@typescript-eslint/eslint-plugin
npm ERR!         @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!         node_modules/eslint-config-react-app
npm ERR!         3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     1 more (@typescript-eslint/typescript-estree)
npm ERR!   1 more (the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/juha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/juha/.npm/_logs/2023-03-19T13_21_48_738Z-debug-0.log

Did you try recovering your dependencies?

Default installation with the only change being typescript version in package.json

Which terms did you search for in User Guide?

typescript

Environment

Environment Info:

current version of create-react-app: 5.0.1
running from /home/juha/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

System:
OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (1) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Binaries:
Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
Yarn: Not Found
npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
Browsers:
Chrome: Not Found
Firefox: 105.0
npmPackages:
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
react-scripts: 5.0.1 => 5.0.1
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

  1. Run npx create-react-app frontend --template typescript
  2. Update package.json to use typescript: "^5.0.2"
  3. Run npm install <some package>
  4. Error appears

Expected behavior

npm install would run successfully.

Actual behavior

$ npm i react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-scripts@5.0.1
npm ERR! Found: typescript@5.0.2
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"5.0.1" from the root project
npm ERR!   peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from tsutils@3.21.0
npm ERR!   node_modules/tsutils
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!     node_modules/@typescript-eslint/eslint-plugin
npm ERR!       @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!       node_modules/eslint-config-react-app
npm ERR!         eslint-config-react-app@"^7.0.1" from react-scripts@5.0.1
npm ERR!         node_modules/react-scripts
npm ERR!       3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/type-utils@5.55.0
npm ERR!     node_modules/@typescript-eslint/type-utils
npm ERR!       @typescript-eslint/type-utils@"5.55.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!       node_modules/@typescript-eslint/eslint-plugin
npm ERR!         @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!         node_modules/eslint-config-react-app
npm ERR!         3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     1 more (@typescript-eslint/typescript-estree)
npm ERR!   1 more (the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/juha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/juha/.npm/_logs/2023-03-19T13_21_48_738Z-debug-0.log

Reproducible demo

Default CRA using npx create-react-app frontend --template typescript
modify package.json to have "typescript": "^5.0.2"
run npm install <any package>

@Gael-Tonnellier
Copy link

Same here, think it needs a minor update to accept typescript 5 . ( released a week ago )

@Meligy
Copy link

Meligy commented Mar 29, 2023

Workaround

CRA seems to work fine with TypeScript 5. So, if you need a temporary workaround for the error and happy to continue working with it, you can achieve that by creating a new overrides section in your package.json (if not existing already), and adding the same typescript version in dependences to it.

Example:

image

@craigmcc
Copy link

craigmcc commented Apr 3, 2023

Trying the workaround from @Meligy on a small application (but with 5.0.3 instead of 5.0.2) has the following results:

  • Build generates a bunch of TypeError: Cannot set property mark of #<Object> which has only a getter warnings, but does not fail the build.
  • Tests pass.

I am going to test this on a more substantial application as well.

@SleighJ
Copy link

SleighJ commented Apr 3, 2023

Experiencing both issues (TypeError: Cannot set property mark of #<Object> which has only a getter & the npm errors when running install)

The TypeError doesn't keep npm run build from completing, but will prevent the application from building with Docker.

For me, the mentioned work around only suppresses the error when running npm install

@KurtGokhan
Copy link

I solved the TypeError by adding "fork-ts-checker-webpack-plugin": "^6.5.3" to devDependencies, removing node_modules and lock file and reinstalling. If it doesn't work, make sure the correct version of fork-ts-checker-webpack-plugin is installed by going to the lock file, and remove package manager cache if necessary.

@matteatsleftovers
Copy link

matteatsleftovers commented Apr 3, 2023

+1 to @KurtGokhan's TypeError workaround, it worked well for the CRA-based app I'm working on. Following along with the great suggestions in this issue thread, I added some overrides that allowed successful package installation and builds without the TypeError or dependency clashes. I threw in the typescript-estree override because otherwise there was a complaint about unsupported TypeScript version when I linted my app, but YMMV on that addition.

"overrides": {
  "@typescript-eslint/typescript-estree": "^5.57.1",
  "fork-ts-checker-webpack-plugin": "^6.5.3",
  "typescript": "^5.0.3",
},

@craigmcc
Copy link

craigmcc commented Apr 3, 2023

I was startled to find a subsequent result after my previous use of @Meligy suggestion. Removing the override failed with react 5.0.2, but succeeded with react 5.0.3! What the heck?

The dependency declarations for react-scripts 5.0.1 did not change, but the resulting behavior certainly did. Without any actual release notes for 5.0.3, it is not at all clear what actually changed that might have caused this.

EDIT: Never mind. Deleting node_modules and reinstalling everything (without the overrides entry) caused the error to reappear. Probably something to do with caching in my IDE.

@Tamara-Sennin
Copy link

Is there some patch coming to fix this? I updated typescript to v5 and now react-scripts is failing, and we won't put an overrides on our project, that's a workaround not a fix

@stefanzero
Copy link

This worked for me:

npm install react-router-dom@6 --legacy-peer-deps

@arcasoy
Copy link

arcasoy commented Apr 12, 2023

Just bringing this PR to attention to hopefully bump it's visibility and get it approved. This should resolve the issue going forward: #13071

@Mihai1iMob
Copy link

Mihai1iMob commented Apr 19, 2023

I just used this override in package.json to make npm i work:

    ...
    "fork-ts-checker-webpack-plugin": "^6.5.3",
    ...
    "typescript": "^5.0.4"
  },
  "overrides": {
    "react-scripts": {
      "typescript": "^5"
    }
  },

@bru8787
Copy link

bru8787 commented Apr 22, 2023

Describe the bug

After npx create-react-app frontend --template typescript, when you update package.json to use "typescript": "^5.0.2",, npm install <any package> fails with this error:

$ npm i react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-scripts@5.0.1
npm ERR! Found: typescript@5.0.2
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"5.0.1" from the root project
npm ERR!   peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from tsutils@3.21.0
npm ERR!   node_modules/tsutils
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!     node_modules/@typescript-eslint/eslint-plugin
npm ERR!       @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!       node_modules/eslint-config-react-app
npm ERR!         eslint-config-react-app@"^7.0.1" from react-scripts@5.0.1
npm ERR!         node_modules/react-scripts
npm ERR!       3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/type-utils@5.55.0
npm ERR!     node_modules/@typescript-eslint/type-utils
npm ERR!       @typescript-eslint/type-utils@"5.55.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!       node_modules/@typescript-eslint/eslint-plugin
npm ERR!         @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!         node_modules/eslint-config-react-app
npm ERR!         3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     1 more (@typescript-eslint/typescript-estree)
npm ERR!   1 more (the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/juha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/juha/.npm/_logs/2023-03-19T13_21_48_738Z-debug-0.log

Did you try recovering your dependencies?

Default installation with the only change being typescript version in package.json

Which terms did you search for in User Guide?

typescript

Environment

Environment Info:

current version of create-react-app: 5.0.1 running from /home/juha/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

System: OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver) CPU: (1) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz Binaries: Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node Yarn: Not Found npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm Browsers: Chrome: Not Found Firefox: 105.0 npmPackages: react: ^18.2.0 => 18.2.0 react-dom: ^18.2.0 => 18.2.0 react-scripts: 5.0.1 => 5.0.1 npmGlobalPackages: create-react-app: Not Found

Steps to reproduce

  1. Run npx create-react-app frontend --template typescript
  2. Update package.json to use typescript: "^5.0.2"
  3. Run npm install <some package>
  4. Error appears

Expected behavior

npm install would run successfully.

Actual behavior

$ npm i react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-scripts@5.0.1
npm ERR! Found: typescript@5.0.2
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"5.0.1" from the root project
npm ERR!   peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from tsutils@3.21.0
npm ERR!   node_modules/tsutils
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!     node_modules/@typescript-eslint/eslint-plugin
npm ERR!       @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!       node_modules/eslint-config-react-app
npm ERR!         eslint-config-react-app@"^7.0.1" from react-scripts@5.0.1
npm ERR!         node_modules/react-scripts
npm ERR!       3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/type-utils@5.55.0
npm ERR!     node_modules/@typescript-eslint/type-utils
npm ERR!       @typescript-eslint/type-utils@"5.55.0" from @typescript-eslint/eslint-plugin@5.55.0
npm ERR!       node_modules/@typescript-eslint/eslint-plugin
npm ERR!         @typescript-eslint/eslint-plugin@"^5.5.0" from eslint-config-react-app@7.0.1
npm ERR!         node_modules/eslint-config-react-app
npm ERR!         3 more (eslint-config-react-typescript, eslint-plugin-jest, the root project)
npm ERR!     1 more (@typescript-eslint/typescript-estree)
npm ERR!   1 more (the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/juha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/juha/.npm/_logs/2023-03-19T13_21_48_738Z-debug-0.log

Reproducible demo

Default CRA using npx create-react-app frontend --template typescript modify package.json to have "typescript": "^5.0.2" run npm install <any package>

Yes , its still an active issue , for me solved removing typescript , running npm i and then install again typescript...

lorenzocorallo added a commit to lorenzocorallo/TheTOLProject that referenced this issue Apr 26, 2023
* typescript v5 is not currently supported by react-scripts (see facebook/create-react-app#13080)
shrouxm added a commit to techmatters/terraso-web-client that referenced this issue Apr 26, 2023
until create-react-app bumps their version, see:
facebook/create-react-app#13080
EndBug added a commit to PoliNetworkOrg/TheTOLProject that referenced this issue Apr 28, 2023
* chore(deps): bump axios from 0.24.0 to 1.3.6

* chore(deps): bump eslint from 7.32.0 to 8.39.0

- eslint from 7.32.0 to 8.39.0
- @typescript-eslint/eslint-plugin from 4.33.0 to 5.59.1
- @typescript-eslint/parser from 4.33.0 to 5.59.1
- eslint-plugin-parser from 4.0.0 to 4.2.1
- eslint-config-parser from 8.3.0 to 8.8.1
- correct assignment of license attributes in <meta>

* chore(deps): bump i18next and react-i18next

- i18next from 22.4.13 to 22.4.15
- react-i18next from 12.2.0 to 12.2.2

* chore(deps): bump ts-node from 10.3.0 to 10.9.1

* chore(deps): bump ts-prune from 0.10.1 to 0.10.3

* chore(deps): bump underscore from 1.13.1 to 1.13.6

* chore(deps): bump rimraf from 3.0.2 to 5.0.0

* chore(deps): bump @types/underscore from 1.11.3 to 1.11.4

* chore(deps): bump react-collapsible from 2.8.4 to 2.8.10

* chore(deps): bump prettier from 2.4.1 to 2.8.8

- add parentheses for `TypeofTypeAnnotation`
  (prettier/prettier#14458,
  prettier/prettier#14042)

* chore(deps): bump mkdirp from 1.0.4 to 3.0.1

* chore(deps): bump react-to-print from 2.14.0 to 2.14.12

* chore(deps): bump react-icons from 4.3.1 to 4.8.0

* chore(deps): bump gh-pages from 3.2.3 to 4.0.0

note: latest is 5.0.0, but it requires Node>=14

* chore(deps): bump typescript from 4.4.3 to 4.9.5*

* typescript v5 is not currently supported by react-scripts (see facebook/create-react-app#13080)

* chore(deps): bump google-spreadsheet from 3.1.15 to 3.3.0

* chore(deps): bump depcheck from 1.4.2 to 1.4.3

---------

Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
@HassanBharu
Copy link

Workaround

CRA seems to work fine with TypeScript 5. So, if you need a temporary workaround for the error and happy to continue working with it, you can achieve that by creating a new overrides section in your package.json (if not existing already), and adding the same typescript version in dependences to it.

Example:

image

used this as a workaround, pipeline is now building with no error, but I'm guessing there is still not actual fix? in package.json its put dev=true against allot of the modules, will this impact anything else? or any other environments

@hokwanhung
Copy link

hokwanhung commented Dec 15, 2023

I just used this override in package.json to make npm i work:

    ...
    "fork-ts-checker-webpack-plugin": "^6.5.3",
    ...
    "typescript": "^5.0.4"
  },
  "overrides": {
    "react-scripts": {
      "typescript": "^5"
    }
  },

Currently using this workaround, but I just hope this issue will get solved one day - as it really is not a fix, and consists of risks for projects requiring high stabilities of dependencies.

@craigmcc
Copy link

It is extremely unlikely that this will ever get officially "fixed".

Create React App is basically dead. Nothing has been updated for over two years now. Even the documentation about it has been migrated to a "legacy" URL:

https://legacy.reactjs.org/docs/create-a-new-react-app.html

The React team recommends using a different toolchain, including (for example) Next.js that has implementation support for React Server Components and Server Actions.

@cristianocca
Copy link

Looking for an update as well. Sadly, CRA is still widely used and the migration is unjustifiable right now.

@jvictordev1
Copy link

Workaround

CRA seems to work fine with TypeScript 5. So, if you need a temporary workaround for the error and happy to continue working with it, you can achieve that by creating a new overrides section in your package.json (if not existing already), and adding the same typescript version in dependences to it.

Example:

image

thanks man this worked!!!!

yuhueilee added a commit to yuhueilee/wendyfolio that referenced this issue Feb 22, 2024
* Remove web vitals check

* Add github workflows file for unit test

* Add babel dev dependencies to resolve the warning

* update node packages

* Add tsconfig file

* Add eslintignore file

* Import necessary packages for converting javascript to typescript

* Convert to typescript files

* Add overrides to resolve typescript 5.x version based on facebook/create-react-app#13080

* Sync the package lock file with "npm config set legacy-peer-deps false" and "npm i"
phoenixy1 added a commit to plaid/tiny-quickstart that referenced this issue Mar 25, 2024
bovrhovn pushed a commit to vrhovnik/azure-sample-cloudtesting that referenced this issue Apr 15, 2024
* update deps from dependabot alerts

* workaround until react-scripts supports TypeScript 5.X facebook/create-react-app#13080
4sploit added a commit to 4sploit/4sploit.github.io that referenced this issue Apr 20, 2024
FemenSB added a commit to FemenSB/voting_client that referenced this issue Jun 4, 2024
This patch adds the "overrides" section in package.json as a workaround for a TypeScript dependency conflict. For more info, check facebook/create-react-app#13080
It also removes the style-components dependecy, as it's likely to remain unused in this project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests