0

I am very happy with Windows WSL running my lamp stack (apache, mysql, php, node).

The only pain currently is performance on npm install / composer install / npm run serve.

At the moment my only option is to run those commands outside of WSL, which is not the preferrable way because of several issues (different environment).

I have two possible solutions:

Exclude these folders from mount / folder sync. Is this somehow possible that WSL just excludes those folders from syncing between my Windows machine and the linux mount? Can I unmount a subfolder ("node_modules" and/or "vendor")?

Make a symlink from /mnt/c/htdocs/project/node_modules to ~/project/node_modules to outsource these modules and prevent a drop in i/o performance.

Unfortunately the second option does not work properly; E.g. when I run npm install, I get a "Cannot find module 'mkdirp'."

I'm happy for any advice.

David Vielhuber
  • 3,253
  • 3
  • 29
  • 34

1 Answers1

0

I managed to fix this with 2 steps:

  • Add "node" to exclusion list of windows defender
  • Install the newest windows october update (which has a lot of improvements in stability and speed in WSL)
David Vielhuber
  • 3,253
  • 3
  • 29
  • 34