Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm keeps crashing my locally ran server because of Git's index.lock

Error: EPERM: operation not permitted, lstat 'C:\ProjectDirectory\.git\index.lock'
    at Error (native)

I'm using WebStorm and everytime I run the local server for testing purposes using npm start, it crashes inevitably sometimes after doing nothing, and sometimes after making a change or so.

I'm using this React boilerplate and the actual author responded to a bug issue I brought up about this saying "Based on the error, it looks like either your editor or your source control system is locking files."

I'm a bit tired restarting the server every time I make a couple changes and would love to fix this.

Full error log

like image 533
user1189352 Avatar asked Aug 31 '17 18:08

user1189352


1 Answers

Only IDE have reason to watch .git/ folder. So if something else tries then it's a bug in configuration.

npm start is an alias for npm-run-all --parallel test:watch open:src lint:watch.

Make sure that .git/ is exempted in their configuration.

like image 133
przemo_li Avatar answered Oct 27 '22 00:10

przemo_li