由于 Git 的 index.lock,WebStorm 不断使我的本地 运行 服务器崩溃

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)

我正在使用 WebStorm,每次我 运行 本地服务器使用 npm start 进行测试时,它不可避免地会崩溃,有时什么都不做,有时在进行一些更改之后。

我正在使用 this React boilerplate,实际作者回应了我提出的关于这句话的错误问题 "Based on the error, it looks like either your editor or your source control system is locking files."

我有点厌倦了每次进行一些更改都需要重新启动服务器,我很乐意解决这个问题。

Full error log

只有IDE有理由观看.git/文件夹。因此,如果有其他尝试,那就是配置错误。

npm startnpm-run-all --parallel test:watch open:src lint:watch.

的别名

确保 .git/ 在他们的配置中被豁免。