Git index.lock file exists | --root-changelog not working
See original GitHub issueI believe this is a 2-part issue.
Our project contains 1000+ libraries. When I run nx run workspace:version, the semver plugin starts generating CHANGELOG.md files for every library. At some point it stops with the following error:
Error: Command failed: git add /Users/crash/git/iko-travel-spa/libs/shared/ui-date-time-picker-form/CHANGELOG.md
fatal: Unable to create '/Users/crash/git/iko-travel-spa/.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
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.
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Socket.<anonymous> (internal/child_process.js:444:11)
at Socket.emit (events.js:314:20)
at Pipe.<anonymous> (net.js:675:12)
I am not running any other process of Git.
The second part of this issue is that, according to your documentation, it should just create / update a single CHANGELOG.md file located in project root. I’ve tried updating the call by including:
nx run workspace:version --root-changelog=true
with no success.
I think there is definitely an error happening when there are too many projects and the lock file wasn’t removed fast enough between change log generations. But this error is caused by the fact that the plugin should be generating only one change log but instead generates 1K+, in the case of my project.
Please let me know if I can provide you with anything else.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
Perfect!! That will fix the Nx cache invalidation as well here: #149
@bjornharvold I just opened a PR related to your comment.