Skip to content

Instantly share code, notes, and snippets.

@adarsh-chakraborty
Created November 24, 2021 13:11
Show Gist options
  • Save adarsh-chakraborty/5af10a5538c17ed8d7829636f60533de to your computer and use it in GitHub Desktop.
Save adarsh-chakraborty/5af10a5538c17ed8d7829636f60533de to your computer and use it in GitHub Desktop.
Fix Host key verification failed while building an app on Heroku. It usually happens when you have a github repo as dependency in your app.

Step 1

Delete the package-lock.json file from your project.

Step 2

Clear the build cache

First install the plugin:

heroku plugins:install heroku-builds

Then use the following command to clear the cache:

heroku builds:cache:purge -a example-app

The cache will be rebuilt on the next deploy. If you do not have any new code to deploy, you can push an empty commit.

@elissonmichael
Copy link

Thanks.

@jrej-dev
Copy link

Worked for me too. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment