Kill whatever process is locking your files
It seems like this kind of error can be caused by a file permissions lock – I experienced something very similar (the same ERRNO: -4048) when installing whatwg-fetch
.
I found that a Visual Studio instance I had open at the same time was acquiring all kinds of files which it didn’t need. Once I closed that down, the install worked perfectly.
This may be a quickly-checked possible cause to eliminate before moving on to more drastic measures…