Skip to content

react-scripts start is serving old data #10301

Open
@Lagicrus

Description

@Lagicrus

Describe the bug

When using react scripts start to serve Dev data, the served JSX is old/cached when it breaks.
For example, when I accidentally added ; by accident to the end of some code, it broke, and it gave me the popup to say so. But when I then fixed it, that broken code is still being shown to me in the error, even after I both reload the page and even do a forced reload. I have saved the file multiple times and even opened the file itself in a separate program to make sure that it is indeed "fixed", and it is. But webpack seems to think that nope, it is broken still.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

Old code, serving old code, build not updating

Environment

System:
OS: Windows 10 10.0.20279
CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
Binaries:
Node: 12.14.1 - E:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.10 - E:\OneDrive\GitHub\talespire\site\node_modules.bin\npm.CMD
Browsers:
Chrome: 87.0.4280.88
Edge: Spartan (44.20279.1.0)
Internet Explorer: 11.0.20279.1
npmPackages:
react: ^16.14.0 => 16.14.0
react-dom: ^16.14.0 => 16.14.0
react-scripts: ^4.0.1 => 4.0.1
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

  1. Create a CRA App
  2. start the server to serve it to the client to work on
  3. add a error
  4. fix the error
  5. see no change

Expected behavior

The code to change in the browser & console when I changed the file itself

Actual behavior

It didn't change.
Both console and the website give me this error
image , but the code it references is this https://starb.in/BjDNGR.js
This is even the case after, reloading the page, clearing cache, restarting the server, uninstalling it (4.0.1) and reinstalling ^3.4 and back again. Even removing that whole function, saving, and adding it back in doesn't fix.
Breaking it will show the new error, but when that is fixed, it will show the old one and old code again.
I got it to work once an hour ago and no idea how I did that.

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