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

Very slow recompile times (~20 seconds) #9886

Closed
FezVrasta opened this issue Oct 24, 2020 · 83 comments · Fixed by #9911
Closed

Very slow recompile times (~20 seconds) #9886

FezVrasta opened this issue Oct 24, 2020 · 83 comments · Fixed by #9911

Comments

@FezVrasta
Copy link
Contributor

FezVrasta commented Oct 24, 2020

Describe the bug

(Write your answer here.)

Hi, I'm trying to upgrade from 3.4.1 to 4.0.0 but I noticed that when I make a change it takes approx 20 seconds to recompile. With 3.4.1 it's just a couple of seconds.

Did you try recovering your dependencies?

I deleted node_modules, yarn.lock, and installed the deps.

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Slow, compile time, recompile.

Environment

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
  Binaries:
    Node: 14.5.0 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Firefox: 81.0
    Safari: 14.0
  npmPackages:
    react: ^17.0.1 => 17.0.1 (16.14.0)
    react-dom: ^17.0.1 => 17.0.1 (16.14.0)
    react-scripts: ^4.0.0 => 4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. yarn start
  2. change a file
  3. observe the time it spends on "Compiling..."

Expected behavior

The recompile time should be almost instantaneous. It also takes a lot of time to start the first time (after yarn start)

Actual behavior

(Write what happened. Please add screenshots!)
The app takes 20 seconds to recompile.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)
Not available, I think it's related to the size of my app (It's 1012 files)

@vlad-khitev-axon
Copy link

vlad-khitev-axon commented Oct 24, 2020

I have exactly the same problem. In a big TypeScript project (~1000 files) before upgrading to react-scripts@4 any code changes were applied immediately.

Any combination of TSC_COMPILE_ON_ERROR and FAST_REFRESH env variables doesn't affect the compilation time.

 System:
    OS: macOS 10.15.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Edge: Not Found
    Firefox: 80.0.1
    Safari: 13.1.2
  npmPackages:
    react: ^17.0.1 => 17.0.1 (16.14.0)
    react-dom: ^17.0.1 => 17.0.1 (16.14.0)
    react-scripts: ^4.0.0 => 4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found

@balonsom
Copy link

I have the same problem, it takes around 20 seconds each time it recompiles. It was not happening on 3.4.1

Environment Info:

  System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-1060NG7 CPU @ 1.20GHz
  Binaries:
    Node: 14.4.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Edge: Not Found
    Firefox: 81.0
    Safari: 14.0
  npmPackages:
    react: 17.0.1 => 17.0.1 (16.14.0)
    react-dom: 17.0.1 => 17.0.1 
    react-scripts: 4.0.0 => 4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found

@jjhbw
Copy link

jjhbw commented Oct 24, 2020

Same here, recompiles take several times as long as on 3.4.x

@MichaelBurgess
Copy link

MichaelBurgess commented Oct 24, 2020

Same here, I can't viably use 4.0.0 as it stands. Previously I'd get a reload of page in ~2 seconds after changing some code. Now takes ~45 seconds. Initial start time is also about 3-4x slower.

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
  Binaries:
    Node: 14.13.0 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Edge: Not Found
    Firefox: 81.0
    Safari: 14.0
  npmPackages:
    react: 16.14.0 => 16.14.0
    react-dom: 16.14.0 => 16.14.0
    react-scripts: 4.0.0 => 4.0.0
  npmGlobalPackages:
    create-react-app: Not Found

@ali-master
Copy link

Same here, Is there a way to solve this issue?

@FezVrasta
Copy link
Contributor Author

Is anyone aware of a flag that can be set to make the yarn start command log verbose output? I'd like to understand what's the underlying issue but with the existing log there isn't any information available.

@paul-vd
Copy link

paul-vd commented Oct 24, 2020

Having the same issue here 💤

Is anyone aware of a flag that can be set to make the yarn start command log verbose output? I'd like to understand what's the underlying issue but with the existing log there isn't any information available.

@FezVrasta not sure you can do that with a flag, but you can use patch-package to remove this line from react-scripts.
Or you could try one of these methods. I don't think the FORCE_COLOR works anymore.

UPDATE:

I disabled the fast refresh using FAST_REFRESH=false
I then tried injecting it into the webpack config using customise-cra with customize-cra-react-refresh, this is the method I used before cra v4.

The outcome is the same... 👎

Anyone using a rewired cra that is experiencing this problem?

@ali-master
Copy link

ali-master commented Oct 24, 2020

Having the same issue here 💤

Is anyone aware of a flag that can be set to make the yarn start command log verbose output? I'd like to understand what's the underlying issue but with the existing log there isn't any information available.

@FezVrasta not sure you can do that with a flag, but you can use patch-package to remove this line from react-scripts.
Or you could try one of these methods. I don't think the FORCE_COLOR works anymore.

UPDATE:

I disabled the fast refresh using FAST_REFRESH=false
I then tried injecting it into the webpack config using customise-cra with customize-cra-react-refresh, this is the method I used before cra v4.

The outcome is the same... 👎

Anyone using a rewired cra that is experiencing this problem?

I have your problem because I've used the react-app-rewired to customize the Create-react-app and I disabled the FAST_REFRESH but I got the same issue and every time I change my code, I have to wait for about 50 seconds to see my changes in the Browser.

@jmcpeak
Copy link

jmcpeak commented Oct 24, 2020

I believe the problem may be related to eslint as my IDE which runs eslint on a file save is slow at this task.

@werevamp
Copy link

@jmcpeak It was my .eslintrc.js file that was making everything slow for me. This may not work for everyone but it worked for me. I ended up commenting out a few libraries from my extends list and now it is much faster:

  extends: [
    'plugin:@typescript-eslint/recommended',
    // 'airbnb-typescript',
    // 'airbnb/hooks',
    // 'prettier',
    // 'prettier/react',
    // 'prettier/@typescript-eslint',
    // 'plugin:prettier/recommended',
  ],

@RubenMateus
Copy link

Same happening with a medium size project. Upgraded to v4 and its takes a bit more time to recompile. around 5-6s,
previous was almost instant.

@houmark
Copy link

houmark commented Oct 25, 2020

I've also experienced slow recompile and the only "solution" which is of course not a solution, is to out-comment libraries/plugins.

@FezVrasta
Copy link
Contributor Author

It may be a coincidence, but running eslint . takes 20 seconds too, so it looks like CRA is running ESlint from scratch on each file change, rather than using a partial approach or some kind of cache.

@vlad-khitev-axon
Copy link

vlad-khitev-axon commented Oct 25, 2020

Is there a way to completely remove ESLint from the dev compilation process? I believe many developers use ESLint as an IDE extension, so why do we need to duplicate it in react-scripts? I mean, every time developer saves a file, both IDE and react-scripts trigger their own ESLint process.

For me, it would be useful to run the lint command explicitly only in two situations: before a commit (lint-staged) and before a build (react-scripts).

@YannHulot
Copy link

I am experiencing the same thing. It takes about 20 seconds to recompile the files and on V4 which obviously is a problem.

@jmcpeak
Copy link

jmcpeak commented Oct 25, 2020

Is there a way to completely remove ESLint from the dev compilation process? I believe many developers use ESLint as an IDE extension, so why do we need to duplicate it in react-scripts? I mean, every time developer saves a file, both IDE and react-scripts trigger their own ESLint process.

For me, it would be useful to run the lint command explicitly only in two situations: before a commit (lint-staged) and before a build (react-scripts).

I second this wholeheartedly.

I understand that CRA is meant to get new users up and going quickly along with enforcing good React code practices with eslint which is why it should be turned on by default - for sure.

But it also has another purpose, making a large portion of professional React projects not worry about sane configuration settings, bundling, builds, etc. I hand that work over to the smart folks running this project. I have a bizillion other things to worry about trying to deliver a quality product.

Maybe switching eslint off/on with a flag would be good idea?

@jmcpeak
Copy link

jmcpeak commented Oct 25, 2020

I disabled eslint by setting this in package.json:

  "eslintConfig": {
    "ignorePatterns": ["src/*", "!src/test.js"]
  }

(eslint requires a minimum of one file to work, I gave it test.js)

And I had to rename my .eslintrc.json file (doesn't speed up unless you do this).
I renamed mine to .eslintrc-ide.json and pointed my IDE's eslint configuration tool to use this file instead.

yarn start feels like its back to normal speed

@vlad-khitev-axon
Copy link

In addition to the answer above,
If using VSCode, you can simply add these lines to your .vscode/settings.json:

{
  "eslint.options": {
    "ignorePattern": ["!src/*"],
  }
}

So, in package.json or .eslintrc you ignore the src folder and in the editor settings you revert that.

@wunnle
Copy link

wunnle commented Oct 25, 2020

Same here, I've disabled react-scripts's eslint in my eslintrc and enabled it again in vscode settings like @vlad-khitev-axon suggested. Now compiling duration is even better than 3.4.1.

However this "solution" is a bit dirty.

@YannHulot
Copy link

Following a combination of @jmcpeak and @vlad-khitev-axon' s advice, I managed to fix the compiling issue. Compiling time is back to what it was before the migration to V4.

This is obviously some kind of hack and it does feel dirty to mess with the eslint config as such. Hopefully ther will be a better way to do this in the future.

In the meantime, kudos to the team for pushing v4 out. Besides this small issue the migration was very smooth and nothing else broke.

@akinorimiz
Copy link

It does not seem like eslint caching is enabled by default. It would be way faster when I updated options for eslint-webpack-plugin in the node_modules/react-scripts/config/webpack.config.js directly.

new ESLintPlugin({
  cache: true,
  ...

@esetnik
Copy link

esetnik commented Oct 28, 2020

Will the fix for this be released soon? This is currently blocking us from upgrading to cra v4 as it causes a 10x increase in compilation time on our project.

@jmcrthrs
Copy link

@esetnik It has been added to the 4.0.1 milestone: https://github.com/facebook/create-react-app/milestone/78

@mattdarveniza
Copy link

mattdarveniza commented Jan 18, 2021

For those still struggling with recompile speeds, one of the reasons it may be slower in v4 is because the lint will run on every compile using the config in your own custom .eslintrc if one exists. For most typescript users this will usually involve some typescript rules which can be super slow to run on every build.

Try running eslint across your whole codebase manually (with a cache) and see how much that takes, if this is the problem it should take about as long as your compiles take.

There's a discussion here about being able to disable eslint runs on compile altogether, which makes sense if you have a custom .eslintrc and already have eslint running in your editor and CI.

In the meantime, I have personally disabled the eslint build using patch-package with this patch:

diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index eddca1b..3a895d1 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -750,7 +750,7 @@ module.exports = function (webpackEnv) {
           // The formatter is invoked directly in WebpackDevServerUtils during development
           formatter: isEnvProduction ? typescriptFormatter : undefined,
         }),
-      new ESLintPlugin({
+        isEnvProduction && new ESLintPlugin({
         // Plugin options
         extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
         formatter: require.resolve('react-dev-utils/eslintFormatter'),

That's not an ideal long term solution but better than the cumulative hours you'll spend waiting for eslint to run on every compile.

@VasilKrumov
Copy link

VasilKrumov commented Jan 24, 2021

Hey everyone,

I tried all solutions here - changing my scripts version, adding the resolution at the end of the package.json, uninstalling, installing, every single suggestion in this thread I've tried it.

Nothing seems to be working for me, is there anything I could try?

Here is my package.json:

{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-scripts": "4.0.1",
    "web-vitals": "^0.2.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "resolutions": {
    "react-scripts/eslint-webpack-plugin": "2.3.0"
    }
}

I am using the absolute basic create-react-app that comes from the script directly, no modifications, no extra packages, nothing.
At first it takes forever to even start the dev server, then the changes never come through.

Please someone help me.

@rfdomingues98
Copy link

"resolutions": {
"react-scripts/eslint-webpack-plugin": "2.3.0"
}

Change this last line from 2.3.0 to 2.4.1. Now it reloads fast when i make some changes on the code, but it does still (not sure if it was supposed to solve this too or not) take a very long time to start dev server.

@amd-9
Copy link

amd-9 commented Jan 25, 2021

I and othe people (according to this issue) still struggling with very long time to start dev server. @ianschmitz is it possible to reopen this issue?

@VasilKrumov
Copy link

Hey everyone,

I managed to solve it. The problem was that I am on Windows and I am running WSL.
Now the react-app was on my windows but the terminal entry point in WSL.
As you'd imagine that was causing the delay.
As soon as I sorted my node versions on both places and ran the start from windows (also tested it separately if I did CRA in WSL) all worked like a charm!

Thanks for the help!

@riungemaina
Copy link

riungemaina commented Jan 29, 2021

If you got here & none of the solutions above have sorted your Issue, just fall back to the last best version that worked for you, I was using react ^17 and react scripts ^4.0 but I went back to "react": "16.13.1", and "react-scripts": "3.4.4", Its terrible advice, but I don't care an awful lot about the improvements in 17, at least not as much as I care about my productivity and development speeds, and with the new stuff that is being disrupted. Its a very 'noob' approach but along the line someone will fix it, then I can enjoy 17.

edit;
as @amcsi mentioned below you can keep react v17

@amcsi
Copy link

amcsi commented Jan 29, 2021

@castynet React^17 is the one thing you don't have to give up though, because react-scripts v3 already supported it even before v4.

@mareksuscak
Copy link
Contributor

mareksuscak commented Jan 29, 2021

This might be an unpopular opinion but y'all are beating a dead horse here I'd say. It seems that the time is up for Create React App now that there's a way to migrate to and incrementally adopt Next.js which is far superior in my opinion. If I remember correctly, React core team supports Next.js initiative so there's probably not much motivation to keep supporting both projects proactively since there's a certain amount of functional overlap.

PS: I am in no way affiliated with Next or Vercel. This is just my personal take so please take it with a grain of salt.

@fkirc
Copy link

fkirc commented Jan 29, 2021

Thanks for the suggestions.
I am not going to switch immediately, but I fully understand the need for alternatives like Next.js.
In fact, this issue has been a huge disappointment and I really lost confidence in cra.

@paul-vd
Copy link

paul-vd commented Jan 29, 2021

lol @mareksuscak yes next.js may be far superior for web, but CRA still has a lot of value if you are not aiming for web, take an example, if i want to compile my app and contain it with cordova to run on mobile, you can do that with ease on cra, but with nextjs that is not possible. So imo it's two completely different solutions.

@mareksuscak
Copy link
Contributor

@PaulPCIO fair enough. I acknowledge my response does not cover all of the possible use cases and it wasn't my goal anyway. I was responding to the majority who use CRA on the web. There may be more alternatives for some of us than others. My point still stands, though. From my perspective, this project could greatly benefit from onboarding more proactive maintainers who can review and merge pull requests from its large open-source community and overall manage this project. I believe that's what's causing all delays and ostensible lack of interest or motivation. I don't want to offend any active members so please don't hate me for saying this out loud. This is just my current perspective.

@fkirc
Copy link

fkirc commented Jan 29, 2021

This is also in line with my observations.
For example, my PR #10265 did not even receive a single comment from the maintainers.
Also the number of ignored issues and PRs seems to be devastating.
It seems that Facebook has lost interest in cra, and now the project is sailing in "minimal maintenance mode".

@paul-vd
Copy link

paul-vd commented Jan 29, 2021

@mareksuscak I do agree with you though in using nextjs when it is possible as a solution, about 80% of my projects run on nextjs and vercel, but yea still has that 20% percent that is dependant on cra. It would be created to see the same interactivity from the cra team as nextjs. Both teams have been innovative but yea nextjs takes the cake if you count the progress they made and the excellent dev experience they provide 🖥️

and same this is just my personal opinion. 😉

@aprilmintacpineda
Copy link

I just found out that on .env we can add DISABLE_ESLINT_PLUGIN=true

@DungRaymond
Copy link

@aprilmintacpineda That's a nice move. Really reduced the compile time

@FunctionDJ
Copy link

I cut down my HMR update time a lot by using craco to have a custom start script which disables ESLint without disabling it anywhere else (editor, husky git hooks, or any other tooling).

Install: npm i craco -S

craco.config.js:

module.exports = {
  eslint: {
    enable: false
  }
}

package.json:

  "scripts": {
    "start": "craco start",
    "start:eslint": "react-scripts start",
    "build": "react-scripts build",
    "lint": "eslint . --max-warnings 0"
  }

I will check out Next.js though. Maybe it's worth switching, i've used Next.js before, and only went with CRA because i didn't need any backend for my current project.

wombleton pushed a commit to AurorNZ/create-react-app that referenced this issue Jun 1, 2021
@ndukachukz
Copy link

I'm using windows and yarn start is taking more than 15 minutes to run craco start

@Digiraf
Copy link

Digiraf commented May 10, 2022

Adjust node_modules/react-scripts/config/webpack.config.js as mentioned here: #9886 (comment)

in my case change:

arround line 764

!disableESLintPlugin && new ESLintPlugin({

to

!disableESLintPlugin && isEnvProduction &&new ESLintPlugin({

You can auto patch the package using patch-package as i deed:
https://www.npmjs.com/package/patch-package

npx patch-package react-scripts

@chaitanya71998
Copy link

Greetings, i was using "react-scripts": "5.0.1". For development server it is taking high ram consumption of 3-4GB. After a single change system RAM is increasing to 5 GB and the server is stopping on complete RAM consumption, saying JavaScript heap out of memory. Also the recompiling time is varying between 8-15 seconds. why is it happening like this?

@infomus
Copy link

infomus commented May 10, 2023

Somehow, switching from yarn to npm did the trick for me (although just deleting node_modules and re-installing may have also been helpful, but I didn't think to isolate that test).

@ShaMan123
Copy link

CRA is dead.
I would like to step on its grave for the sake of others.
Unfortunately I am compiled to use this horrible tool as part of a huge project.
Non of the above helped me, using 4.0.3
setting DISABLE_ESLINT_PLUGIN=true should make #9886 (comment) redundant.
I have found that the problem lies in the TS warning dumps.
Tracing back to react-dev-utils/WebpackDevServerUtils.js

Jest will die soon as well IMO.
So long facebook tools 👎
Let's hope react will make it for a few more years...


From your wd:

git apply --directory=node_modules/react-dev-utils path/to/patch

Of course you can add a flag instead using process.env

diff --git a/WebpackDevServerUtils.js b/WebpackDevServerUtils.js
index 9dda650ee..e75a2320a 100644
--- a/WebpackDevServerUtils.js
+++ b/WebpackDevServerUtils.js
@@ -17,8 +17,6 @@ const prompts = require("prompts");
 const clearConsole = require("./clearConsole");
 const formatWebpackMessages = require("./formatWebpackMessages");
 const getProcessForPort = require("./getProcessForPort");
-const typescriptFormatter = require("./typescriptFormatter");
-const forkTsCheckerWebpackPlugin = require("./ForkTsCheckerWebpackPlugin");
 
 const isInteractive = process.stdout.isTTY;
 
@@ -141,25 +139,23 @@ function createCompiler({
 
   if (useTypeScript) {
     compiler.hooks.beforeCompile.tap("beforeCompile", () => {
-      tsMessagesPromise = new Promise((resolve) => {
-        tsMessagesResolver = (msgs) => resolve(msgs);
-      });
+      tsMessagesPromise = Promise.resolve();
     });
 
-    forkTsCheckerWebpackPlugin
-      .getCompilerHooks(compiler)
-      .receive.tap("afterTypeScriptCheck", (diagnostics, lints) => {
-        const allMsgs = [...diagnostics, ...lints];
-        const format = (message) =>
-          `${message.file}\n${typescriptFormatter(message, true)}`;
-
-        tsMessagesResolver({
-          errors: allMsgs.filter((msg) => msg.severity === "error").map(format),
-          warnings: allMsgs
-            .filter((msg) => msg.severity === "warning")
-            .map(format),
-        });
-      });
+    // forkTsCheckerWebpackPlugin
+    //   .getCompilerHooks(compiler)
+    //   .receive.tap('afterTypeScriptCheck', (diagnostics, lints) => {
+    //     const allMsgs = [...diagnostics, ...lints];
+    //     const format = message =>
+    //       `${message.file}\n${typescriptFormatter(message, true)}`;
+
+    //     tsMessagesResolver({
+    //       errors: allMsgs.filter(msg => msg.severity === 'error').map(format),
+    //       warnings: allMsgs
+    //         .filter(msg => msg.severity === 'warning')
+    //         .map(format),
+    //     });
+    //   });
   }
 
   // "done" event fires when webpack has finished recompiling the bundle.
@@ -176,11 +172,11 @@ function createCompiler({
     // https://github.com/facebook/create-react-app/issues/4492#issuecomment-421959548
     const statsData = stats.toJson({
       all: false,
-      warnings: true,
+      warnings: false,
       errors: true,
     });
 
-    if (useTypeScript && statsData.errors.length === 0) {
+    if (false && useTypeScript && statsData.errors.length === 0) {
       const delayedMsg = setTimeout(() => {
         console.log(
           chalk.yellow(
@@ -188,7 +184,6 @@ function createCompiler({
           )
         );
       }, 100);
-
       const messages = await tsMessagesPromise;
       clearTimeout(delayedMsg);
       if (tscCompileOnError) {

@ShaMan123
Copy link

This is even easier

diff --git a/WebpackDevServerUtils.js b/WebpackDevServerUtils.js
index 9dda650ee..02bb745b2 100644
--- a/WebpackDevServerUtils.js
+++ b/WebpackDevServerUtils.js
@@ -111,6 +111,8 @@ function createCompiler({
   tscCompileOnError,
   webpack,
 }) {
+  // kill TS dev errors and warnings
+  useTypeScript = false;
   // "Compiler" is a low-level interface to webpack.
   // It lets us listen to some events and provide our own custom messages.
   let compiler;

abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this issue May 19, 2023
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this issue May 24, 2023
@jonathasborges1
Copy link

jonathasborges1 commented Jul 6, 2023

all work for me after add typescript in devDependencies (recompile times in (~7 seconds)

my package.json bellow

{
  "name": "auth-front-atem",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.10.0",
    "@emotion/styled": "^11.10.0",
    "@mui/icons-material": "^5.8.4",
    "@mui/lab": "^5.0.0-alpha.93",
    "@mui/material": "^5.9.3",
    "@mui/system": "^5.9.3",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.3.0",
    "@testing-library/user-event": "^13.5.0",
    "@types/jest": "^27.5.2",
    "@types/lodash.debounce": "^4.0.7",
    "@types/node": "^16.11.47",
    "@types/react": "^18.0.15",
    "@types/react-dom": "^18.0.6",
    "@types/react-router-dom": "^5.3.3",
    "axios": "^0.27.2",
    "colorize-filter": "^1.0.3",
    "formik": "^2.2.9",
    "framer-motion": "^7.0.0",
    "inversify": "^6.0.1",
    "jwt-decode": "^3.1.2",
    "lodash.debounce": "^4.0.8",
    "notistack": "^2.0.2",
    "react": "^18.2.0",
    "react-code-input": "^3.10.1",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.4.0",
    "react-scripts": "5.0.1",
    "react-spring": "^9.6.1",
    "reflect-metadata": "^0.1.13",
    "universal-cookie": "^4.0.4",
    "use-media": "^1.4.0",
    "web-vitals": "^2.1.4",
    "yup": "^0.32.11"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "typescript": "^5.0.2",
    "cross-env": "^7.0.3"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.