Skip to content

Dev Server does not always show typescript compilation errors #10852

Open
@jdgreenberger

Description

@jdgreenberger

Describe the bug

React dev server does not consistently display typescript errors. Frequently, when running react-scripts start, the compiler does not display typescript errors and I only see them when running react-scripts build. I have noticed that this happens more frequently when there is a typescript error in files that have not been modified or when the dev server is consuming more CPU. Any ideas on why this happens and how to address it?

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

"typescript errors" "typescript changes"

Environment

current version of create-react-app: 3.4.1

System:
OS: macOS 11.2.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 12.7.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.10.0 - /usr/local/bin/npm
Browsers:
Chrome: 89.0.4389.128
Firefox: 85.0.2
Safari: 14.0.3
npmPackages:
react: 16.10 => 16.10.2
react-dom: 16.8.6 => 16.8.6
react-scripts: ^4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

  1. Create a CRA typescript project of sufficient size (couple hundred files)
  2. Run dev server
  3. Trigger an error in a file you didn't change

Expected behavior

Errors show up in the console

Actual behavior

Compiles without error

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions