This would be explained (and expected) if your files are stored on /mnt/c (a.k.a. Correct me if I'm wrong on this, and I'll delete the answer and look for another possibility. Since you mention executing the same files (with proper performance) from within Git Bash, I'm going to make an assumption here. It is possible that's it's purely a WSL problem, but it just hurts the most when using NPM/Yarn Npm start in an empty (freshly initialized) create-react-app takes ages to render something in the browser in WSL and when executed from GitBash - I can see stuff in 2-4 seconds Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/swapfile.sys' Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/pagefile.sys' Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/hiberfil.sys' In some applications I don't get any errors, sometimes I get the following: Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/' ![]() The issue is not limited to NPM, it's also for YarnĪnother problem that I'm getting is that file watching is not happening (I need to restart the server with every change). I've seen some questions that are somewhat similar like 'npm install' extremely slow on Windows, but they don't touch WSL at all (and my pure Windows NPM works fast). I'm running Windows 11 with all the latest updates to both the system and the WSL. My processor: Processor AMD Ryzen 7 5800H with Radeon Graphics, 3201 Mhz, 8 Core(s), 16 Logical Processors Is this something that I can fix? If so - where to look for clues? The project I'm working on uses tens of libraries and changing even one of them takes minutes instead of seconds. This is not the whole picture, because the perceived time was higher in both cases, but even based on that - there is a big issue somewhere. ![]() while GitBash finished with Done in 10.46s. The test was running npx create-react-app my-test-app and the WSL result was Done in 287.56s. I conducted a simple test that confirmed my feelings. I noticed that the speed difference when working with NPM/Yarn is incredible. I am working with WSL a lot lately because I need some native UNIX tools (and emulators aren't good enough).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |