Why can't I deploy my jar file on heroku? - heroku

My version of Heroku is as follows:
heroku/7.0.60 darwin-x64 node-v10.2.1
When I run:
heroku deploy:jar ...
I get:
› Error: deploy:jar is not a heroku command.
› Perhaps you meant destroy
› Run heroku help for a list of available commands.
This seems to contradict the docs:
https://devcenter.heroku.com/articles/deploying-executable-jar-files
What am I doing wrong?

I had the same Error, but the docs helped out. Before you can run the deploy command you have to install the java plugin:
heroku plugins:install java

It means that you have not installed deploy plugin. So first install the heroku deploy plugin using below command:
heroku plugins:install heroku-cli-deploy
And then try to deploy the jar. It should work

Related

laravel heroku Vite manifest not found at: /app/public/build/manifest.jso

after uploading my project Laravel in Heroku say "Vite manifest not found at: /app/public/build/manifest.json"
it work perfectly in localhost but in Heroku not working.
this is a preview of the problem
https://res.cloudinary.com/wanis4007/image/upload/v1656872417/Screenshot_2022-07-03_211622_ohzgs5.png
I run this code before push the project in Heroku
npm install
npm run dev
npm run build
any suggestion ?
okay , the solution is to add both nodejs and php buildpacks to the project before deployment (you can do this also after deployment but you have to redeploy the project)
heroku buildpacks:set heroku/php
heroku buildpacks:set heroku/nodejs
and make sure you have the two buildpacks (php and node js) in your project by using this code
heroku buildpacks
note : you can add buildpacks with heroku dashboard in setting section
I fixed mine:
This solution is inspired by zneharks
$ heroku plugins:install buildpack-registry
$ heroku plugins:install buildpacks
Solution of zneharks
And I set nodejs
$ heroku buildpacks
Or
$ heroku buildpacks:set heroku/nodejs
I solved my code with this
$ heroku buildpacks:add --index 1 heroku/nodejs and
$ heroku buildpacks
after running this in my terminal, I adjusted my code and push to heroku again.
Note: The --index 1 means nodejs build pack will run first before php. PHP Buildpack has already been reinstalled with laravel/heroku.
when you run
heroku buildpacks
it should give you the two buildpacks which is
$ heroku/nodejs and heroku/php

How to install SVN at heroku?

I have a project that needs SVN to install some packages. Specifically, I depend on node-steam-resources and its installation instructions say
Run npm install seishun/node-steam-resources. It fetches the Steam resources and requires svn.
On localhost it works after installing SVN console.
But how to do the same on Heroku?
You'll need to use the apt buildpack to install OS-level packages in addition to your existing buildpack (presumably heroku/nodejs).
Create a new file called Aptfile in the root of your repository. This is where you will define any additional Ubuntu packages you require.
Edit that file so it looks like this:
subversion
Add and commit that file.
Configure your Heroku app to use the correct buildpacks:
First, set your Node.js buildpack explicitly:
heroku buildpacks:set heroku/nodejs
Then add the apt buildpack:
heroku buildpacks:add --index 1 heroku-community/apt
Run heroku buildpacks to make sure you see both buildpacks, with the apt buildpack showing up first and the Node.js buildpack showing up second.
Finally, redeploy your application and watch the build output. You should see the subversion package get installed, then your Node.js dependencies get installed.

How do I run bulma on Heroku?

I can't run bulma on Heroku and npm is not a Heroku command.
What should I type to do npm install bulma on Heroku? Do I need to use yarn?
brew install yarn, yarn add bulma doesn't work on Heroku either.
Here is the error I'm seeing:
Sass::SyntaxError: File to import not found or unreadable: bulma/sass/utilities/_all.sass.
Don't install Bulma yourself, and certainly don't try to install yarn via Homebrew.
Heroku's ephemeral filesystem will prevent it from working properly, interactive commands run on temporary one-off dynos that only exist as long as your session runs, and brew is mostly a macOS package manager (though a Linux version does technically exist).
Heroku will build your application for you as long as you tell it how.
Make sure to include a package.json and package.lock or yarn.lock that includes the JavaScript libraries you need
Tell Heroku which buildpacks to use for your application:
$ heroku buildpacks:set heroku/ruby
$ heroku buildpacks:add --index 1 heroku/nodejs
Make sure the Ruby buildpack is last:
$ heroku buildpacks
=== your-app Buildpack
1. heroku/nodejs
2. heroku/ruby
Deploy your code
Heroku will run the Node.js buildpack first and install JavaScript packages from your lock file, then run the Ruby buildpack and install your gems.

How can I add plugin to heroku repo?

I gave heroku plugins:install heroku-first-blog on terminal.I got an error something like this
Installing plugin heroku-first-blog... !
▸ Plugin not found
! error installing plugin heroku-first-blog
To use heroku plugins you need to specify the plugins git repository URL. For instance, if you wanted to install the heroku accounts plugin you might say:
heroku plugins:install https://github.com/ddollar/heroku-accounts.git
Here's what happens when I run this command locally myself:
$ heroku plugins:install https://github.com/ddollar/heroku-accounts.git
Installing https://github.com/ddollar/heroku-accounts.git... done

how do you run heroku client commands on travis-ci?

what can i add to my .travis.yml to run heroku client commands?
e.g. before deploy:
$ heroku maintenance:on
$ heroku pgbackups:capture --expire
and after deploy:
$ heroku maintenance:on
i've tried adding those commands to before_deploy in .travis.yml, but it doesn't have access to the heroku cli tool.
bonus points if i can do this on the app level, e.g. do backups on the production branch, but not staging.
I just installed Heroku toolbelt in a build container. That's how it looks in my build:
sudo: required
before_script:
# this install.sh script requires sudo
- wget -qO- https://toolbelt.heroku.com/install.sh | sh
script:
- /usr/local/heroku/bin/heroku restart --app my-heroku-app-name # requires HEROKU_API_KEY env variable
Note: installing Heroku requires sudo privilege (sudo: required) and if you have to access your app - $HEROKU_API_KEY environment variable must be set.
You might be able to everything you need with the Heroku deployment support available on Travis CI.
If you need to do more, you need to install Heroku toolbelt, and figure out how to do what you want.

Resources