The buildpacks error while redeploying Jhipster application to heroku
Deploying a jhipster project on heroku is quite simple and straight forward. run following command from the root folder of your application.
$ cd myJhipsterApp
$ jhipster heroku
After making additional changes to the application, when i tried to re run $jhipster heroku to redeploy the changes, it returned error. Few lines of error are as follows -
Error: Command failed: heroku buildpacks:add heroku/java --app myJhipsterApp
Error Plugin: java: files attribute must be specified in /home/user1/.local/share/heroku/node_modules/java/package.json
module: @oclif/config@1.13.2
plugin: java
root: /home/user1/.local/share/heroku/node_modules/javaError: The buildpack heroku/java is already set on your app.
I tried upgrading nodejs , cleaning npm cache but it did not work.
Solution
Run below command from the root directory of your web application to clear the buildpack and redeploy.
$ heroku buildpacks:clear
$ jhipster heroku