5

Generally when I run npm install sometimes my pc crashes and shows the screen like the image below. I’ve tried removing both the package-lock.json and node_modules. I’ve also run the commands npm rebuild -g and npm cache clean -f. 2 days ago I reinstalled my pc to fabric settings and it still doesn’t help.

I’m using WSL, nodejs v12.10.0 and npm 6.10.3.

Anyone knows what’s up and could help me?

https://i.stack.imgur.com/OOg3g.jpg

Isac Larsson
  • 111
  • 5
  • Are you using any antivirus software other than Defender? From: [Windows Subsystem for Linux crashing Windows when “git pull” is run](https://stackoverflow.com/a/57179531/1115360). – Andrew Morton Sep 16 '19 at 08:17
  • @AndrewMorton yes, I’m using Avast Free Antivirus. Haven’t been a problem since I got it more than a year ago. I’ve also made an exception for the path of wsl in Avast. – Isac Larsson Sep 16 '19 at 08:19
  • 1
    Can you temporarily uninstall Avast (and enable Defender) and see if the crash still happens? – Andrew Morton Sep 16 '19 at 08:22
  • 1
    @AndrewMorton yes, already on it, thanks! – Isac Larsson Sep 16 '19 at 08:23
  • This is most definitely an issue I've seen while running npm, and it's super annoying to debug because it's not deterministic and also causes BSOD. I have the same problem with all antivirus (including Windows Defender) disabled. – Andrew Mao Nov 10 '19 at 18:22
  • @AndrewMao if it’s a problem for you try using yarn for some time and see if it makes a difference. The BSOD was happening much less when I went from Avast to Defender but not to 0. Now I’ve used yarn for a couple of projects and the BSOD has never appeared. – Isac Larsson Nov 10 '19 at 18:26
  • 1
    Roger that on the yarn. This seems like a WSL bug which is in discussion at https://github.com/microsoft/WSL/issues/4537. – Andrew Mao Nov 10 '19 at 18:33

1 Answers1

1

Update

I've been using yarn instead of npm since 3 months back and this problem has never occured again. So if you are experiencing the same problem as me, try it out.

Isac Larsson
  • 111
  • 5