Skip to content

Terrible performace (>1 minute) starting localhost:3000 and functionality problems when using create-react-app #5705

Closed

Description

Environment

Windows 10 Home Insider Preview.
Build 20180.rs_prerelease.200725-1714.
Ubuntu 18.04.4
WSL2.

Steps to reproduce

(I will assume you already have nodejs installed)

  1. create a new app via: npx create-react-app my-app.
  2. change directory: cd my-app
  3. run via: npm start

Expected behavior

Within seconds the localhost:3000 should be launched in a new browser window. Showing the react-app default page.
If i make changes to the code (change text to "Hello World") and save in VSC, the changes should immediately be visible on the browser.

Actual behavior

It takes over a minutes to launch the localhost.
When i make changes to the code they are not immediately visible on the browser. clicking refresh on the browser doesn't make the changes visible. I have to re-start the server (> 1 minute) before the changes are visible.

Additional notes:
I have tested this on three windows machines and had the behaviour on all three.

HOWEVER!!! when running the installation via Powershell on the same machine. The expected behaviour works!

Activity

  1. therealkenc commented on Aug 3, 2020

    @therealkenc

    What does pwd return at step 2.5.

  2. licanhua commented on Aug 4, 2020

    @licanhua
    Contributor

    If your project is stored in Windows file system, and then access it from /mnt/ on Linux, WSL 2 is not the best option.

    You only gain the performance boost on WSL 2 if your project files are stored in Linux file system directly.

  3. DiegoMcDipster commented on Aug 4, 2020

    @DiegoMcDipster
    Author

    Canhua Li (@licanhua)
    Thank you SOOOO much!

    that did the trick. the performance is now excellent and the code updates are reflected immediately!

    Closing this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions