Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #8667
Closed
Open
Issue created Mar 18, 2020 by Administrator@rootContributor

Hot reloading breaks when encountering Typescript error

Created by: mikemklee

Describe the bug

I am having exactly same issue as metioned in https://github.com/facebook/create-react-app/issues/8055

Since that issue is now closed, I will just re-describe the issue again here.

Hot reloading seems to stop working when a Typescript compilation error is encountered. Any subsequent code changes would not trigger hot reloading after that, even if I fix the lines that would cause compile errror.

I need to actually close and restart the dev server in order to see my changes reflected.

Which terms did you search for in User Guide?

Typescript, Hot reloading

Environment

  System:
    OS: Linux 4.19 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
  Binaries:
    Node: 13.7.0 - /usr/bin/node
    Yarn: 1.21.1 - /mnt/c/Program Files (x86)/Yarn/bin/yarn
    npm: 6.14.2 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^16.13.0 => 16.13.0 
    react-dom: ^16.13.0 => 16.13.0 
    react-scripts: 3.4.0 => 3.4.0 
  npmGlobalPackages:
    create-react-app: 3.4.0

Steps to reproduce

  1. create-react-app react-app --template typescript
  2. cd react-app
  3. yarn start
  4. Write invalid typescript code in src/App.tsx and save it to trigger compilation error
  5. See TS compiler error message in terminal
  6. Fix the code in src/App.tsx and save it
  7. Note that hot reloading is now NOT triggered
  8. Killing dev server and running yarn start again to see changes get reflected

Expected behavior

Re-compile and hot reload on every save, just like when using create-react-app without the --template typescript flag

Assignee
Assign to
Time tracking