Open tymsai opened 3 years ago
30 seconds is a normal startup time. it might be an older version of webpack and babel issue. In window 10 I believe it will always take a bit longer time to load. it would not worry about it too much.
npm start took exact 8 min to start react app
echo hello is fast
anybody know how to resolve this ?????
try Linux and fuck NTFS will resolve it
i have same problem can any one help me out? thanks in advance
As the project becomes larger and larger, I also encountered this problem. Recently, I used esbuild to improve the speed of the development mode. You can try the integration, which greatly improves the efficiency of the development mode.
npm i react-app-rewired-esbuild -D
okay
you should try yarn instead of npm. yarn is faster
Current Behavior The npm start command is too slow it takes almost 5 min to start
Expected Behavior It was expected to start within some seconds
Steps To Reproduce type npm start and hit enter in Power Shell Terminal
Environment windows 10 home node latest version npm latest
Try yarn instead of npm. Yarn is fatster
Thanks
@Ultra-Tech-code Sorry but I don't get your point. Yarn may be faster for the resolution of the packages, but here we are just talking about starting the development server of the React app. Correct me if I am wrong but it does not change anything to use yarn or npm to start the app from the startup time point of view.
Since Webpack 5 prints its bundling time, it looks like that most of the time spent by react-scripts to start comes from Webpack. I would say that using other bundlers such as Parcel or Vite would help on this issue but it looks like it's far from easy to migrate.
try Linux and fuck NTFS will resolve it
try WinAPIs and fuck Unix and Unix Clones and EXT4/ZFS to death will resolve it
I am facing the same problem :)
I am facing the same problem :)
@ibntofajjal , you can use WSL2 and install your project in Linux's subsystem because dependencies from react server, storybook server, nodemon and others work better in a Linux environment. The steps are:
cd /home/yourusername/projects
)git clone yourproject
cd yourproject
npm install
npm start
@matheusfcorocher Did you notice a noticeable performance improvement? It would be so nice if you could provide a small benchmark. :)
@matheusfcorocher Did you notice a noticeable performance improvement? It would be so nice if you could provide a small benchmark. :)
@Amatewasu, yes my build time was 1.49min(109 s) when the project is in Windows filesystem. And when the project is in Linux filesystem, the build time was 15 s. So, my build time got 7.2x faster. But in both cases I was using a WSL terminal, so my solution could be misleading because my npm package was in Linux subsystem, so the time he needs to transverse until reached project folder in Windows filesystem is greater than if a project is in WSL filesystem.
@matheusfcorocher Did you notice a noticeable performance improvement? It would be so nice if you could provide a small benchmark. :)
@Amatewasu, yes my build time was 1.49min(109 s) when the project is in Windows filesystem. And when the project is in Linux filesystem, the build time was 15 s. So, my build time got 7.2x faster. But in both cases I was using a WSL terminal, so my solution could be misleading because my npm package was in Linux subsystem, so the time he needs to transverse until reached project folder in Windows filesystem is greater than if a project is in WSL filesystem.
Oh great tip, I will try, thanks a lot!
npm start took exact 8 min to start react app
After more than a year it is still taking 8 minutes, wow?!
I read your solutions about using WSL 2, but it has unfixed bug where it takes up all (99%) of your RAM, unless you shut it down and start again. And low RAM is not the issue ... I can't recall the forum where a person had the same issue with 64GB of RAM and the solution was: Yeah it's a known issue.
NOTE: I just googled to see if I was perhaps using WSL version 1, but google's first result:
After upgrade to WSL2, Vmmem almost occupy 100% RAM and CPU, and it don't work with below solution:
.wslconfig
So my personal solution for Windows OS:
npm start
That's interesting.
I created a simple create-react-app project. On my WSL2, npm install
took about 1.5 min and npm start
took about 4 min. On my powershell environment, npm install
took about 15 sec and npm start
took about 30 sec.
I'm surprised people are having better performance on WSL.
I prefer to use vite.js
I dont know if this is still relevant but I fixed this issue by executing commande npm i
Has anyone discovered a solution that effectively addresses this problem? Despite trying using a different web browser (Edge) instead of Chrome, the issue still persists and it is becoming increasingly frustrating.
use vite and yarn for react
Hello, I get the same issue !
use npm i
I am still learning React and I used the command npm start
and it took more than 7 minutes to start the development server. Using Linux Mint 20.04. My project is reall small only has 4 small components.
When I run php artisan serve
to run my PHP projects it takes about 30 seconds to start.
I was using WSL to access my hard drive on the Windows Filesystem. I can confirm that when I moved the project to the same drive as WSL, the project loaded in 3.8 seconds, compared to 5 minutes on the Windows filesystem. I highly recommend keeping your projects on the same drive as WSL.
I was using WSL to access my hard drive on the Windows Filesystem. I can confirm that when I moved the project to the same drive as WSL, the project loaded in 3.8 seconds, compared to 5 minutes on the Windows filesystem. I highly recommend keeping your projects on the same drive as WSL.
yea
Current Behavior The npm start command is too slow it takes almost 5 min to start
Expected Behavior It was expected to start within some seconds
Steps To Reproduce type npm start and hit enter in Power Shell Terminal
Environment windows 10 home node latest version npm latest
Use Git Bash – it worked for me. Windows PowerShell took 7-10 minutes, but with Git Bash, it's down to just 10 seconds!
im facing the same problem, im on vscode using wsl it was working fine but suddenly it started taking too long to start, i dont know why, any help is appreciated.
use vite
Current Behavior The npm start command is too slow it takes almost 5 min to start
Expected Behavior It was expected to start within some seconds
Steps To Reproduce type npm start and hit enter in Power Shell Terminal
Environment windows 10 home node latest version npm latest