Error when updating Heroku CLI: write lock exists:

2019-07-13 10:21发布

问题:

I am trying to update the Heroku CLI, however, without success.

Current version of Heroku CLI is

heroku-cli/6.15.5-1f03166 (win32-x64) node-v9.3.0

When running

heroku update

I get the following error

C:\>heroku update
CLI is updating... !
 !    'ELOCK': write lock exists: update

I didnt' find any solution to this problem so far as I am hesitating to just uninstall and re-install the Heroku CLI (all my configs are lost then).

回答1:

I solved this problem by uninstalling heroku and installing via command line: npm install -g heroku So I got the most current version.



回答2:

Not sure what the cause of this was but restarting solved the issue for me. Good luck!

11:53:26 | ~  : heroku update
heroku-cli: Updating CLI from 6.15.26-5726b6f to 6.15.30-e7b41cd... 
done
Updating plugins, node version changed to 9.7.1... done
heroku-cli: Updating plugins... done


回答3:

I had the same problem and I solved removing this file:

/Users/YOUR_USER/Library/Caches/heroku/update.lock

I use mac, but I guess you will have same file in a similar location



回答4:

I had the same problem on the Mac - solved it by running htop, filtering by heroku and killing all processes.

TLDR; kill running Heroku processes



回答5:

I also had the same problem and solved it by removing error.log from the following directory in Windows 10: C:\Users\Behzad.heroku\error.log