question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git add fails after eslint --fix

See original GitHub issue

Here the output:

[16:45:44] eslint --fix [started]
[16:45:47] eslint --fix [completed]
[16:45:47] git add [started]
[16:45:47] git add [failed]
[16:45:47] → 🚫 git add --ignore-errors found some errors. Please fix them and try committing again.

fatal: Unable to create '…/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
� git add found some errors. Please fix them and try committing again.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

[16:45:47] Running tasks for *.js [failed]

fatal: Unable to create '…/.git/index.lock': File exists.
[16:45:47] → 🚫 git add found some errors. Please fix them and try committing again.

Another git process seems to be running in this repository, e.g.

an editor opened by 'git commit'. Please make sure all processes
fatal: Unable to create '…/.git/index.lock': File exists.
are terminated then try again. If it still fails, a git process

may have crashed in this repository earlier:
Another git process seems to be running in this repository, e.g.
remove the file manually to continue.
an editor opened by 'git commit'. Please make sure all processes

are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:29 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
eavamcommented, Aug 13, 2019

I get the same error after merging. Is there any way to fix it? And it arises on my windows. But everything is fine on the mac

Ok. I think I fixed it via

lint-staged -r

I am testing this fix.

0reactions
okonetcommented, Oct 20, 2019

I would say so, yes. Or to stay on the safer path, just warn about git add And suggest removing it. I assume some might have other hit commands there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR on lint:eslint when commit the code into local repositary
I can't commit my code into my local repository. How can I elimianate this error? Can I need to make any changes needed...
Read more >
Using Git to run ESLint on changed files in a feature branch
TIL how to run static analysis only on files that have been changed in a feature branch, and it's helping us roll out...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
ESLint will throw an error if a rule that implements fix functions does not export the meta.fixable property. The fixer object has the...
Read more >
Linting Staged Git Files with lint-staged -- newline - Fullstack.io
Suppose you correct a problem and later on, you decide to scrap the code that you just fixed. Unfortunately, you wasted time on...
Read more >
How to run ESLint using a pre-commit hook - Level Up Coding
ESLint Git pre-commit hook · If you haven't initialized git for your repo then do so by running the command: git init ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found