Failed to deploy Heroku - heroku

I cannot deploy my app on Heroku as this is the error that I am getting;
I used this website to deploy my app to Heroku => https://betterprogramming.pub/deploy-your-app-for-free-in-7-easy-steps-thanks-to-heroku-dfd0f387edd0
Got this message;
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
remote:
remote: ! ERROR: Application not supported by 'heroku/nodejs' buildpack
remote: !
remote: ! The 'heroku/nodejs' buildpack is set on this application, but was
remote: ! unable to detect a Node.js codebase.
remote: !
remote: ! A Node.js app on Heroku requires a 'package.json' at the root of
remote: ! the directory structure.
remote: !
remote: ! If you are trying to deploy a Node.js application, ensure that this
remote: ! file is present at the top level directory. This directory has the
remote: ! following files:
remote: !
remote: ! client/
remote: ! Procfile
remote: ! README.md
remote: ! smart_contract/
remote: !
remote: ! If you are trying to deploy an application written in another
remote: ! language, you need to change the list of buildpacks set on your
remote: ! Heroku app using the 'heroku buildpacks' command.
remote: !
remote: ! For more information, refer to the following documentation:
remote: ! https://devcenter.heroku.com/articles/buildpacks
remote: ! https://devcenter.heroku.com/articles/nodejs-support#activation
remote:
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to arcane-springs-89425.
remote:
To https://git.heroku.com/arcane-springs-89425.git
The code “git push heroku master” fails for the push-and-deploy process. I haven’t been given an URL where I could see my app.
Steps I took ;
change the buildpack to node.js (I'm using blockchain, stability, metamask)
git add Procfile
git commit -a -m "Configuration to deploy to heroku"
git push heroku master
The website https://git.heroku.com/arcane-springs-89425.git says "Method Not Allowed" in on a blank page.

Related

How to Fix Nodejs Heroku Running into Error?

I followed the step to upload my backend to Heroku from this video: https://www.youtube.com/watch?v=rSkxia0ZZQ0, and I got this error:
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 16 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 3.14 KiB | 1.57 MiB/s, done.
Total 10 (delta 7), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote: 1. https://github.com/timanovsky/subdir-heroku-buildpack.git
remote: 2. heroku/nodejs
remote: -----> Subdir buildpack app detected
remote: PROJECT_PATH is undefined
remote: ! Push rejected, failed to compile Subdir buildpack app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: aad8206689cb2d86d27ef0e2a124aa9701bf8a7b
remote: !
remote: ! We have detected that you have triggered a build from source code with version aad8206689cb2d86d27ef0e2a124aa9701bf8a7b
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to heroku-skiplagged-final.
remote:
To https://git.heroku.com/heroku-skiplagged-final.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/heroku-skiplagged-final.git'
Procfile:
web: node backend/backend.js
Picture of my Folders
Procfile Photo
Package.json Photo
PROJECT_PATH and BuildPacks from Heroku
Video Link with the error above: https://youtu.be/T6eWAdPVOJI
Heroku sees that you made some changes in your visual studio code or what are you using and it's telling you that you didn't push on git the last version of your app.
remote: ! ## Warning - The same version of this code has already been
built: aad8206689cb2d86d27ef0e2a124aa9701bf8a7b remote: ! remote: !
We have detected that you have triggered a build from source code with
version aad8206689cb2d86d27ef0e2a124aa9701bf8a7b
You need to commit your changes in the project and push them to git and after you can push the git on the heroku server.

We have detected that you have triggered a build from source code, remote: ! at least twice

I found this error I tried log but couldn't find the solution, please let me know if anyone having the solution to this problem,
actually two repositories is crated how to remove one so my code push on Heroku server
(tmenv) C:\Users\ok\Desktop\Django\Django_project\taskmate>git push heroku master
Enumerating objects: 346, done.
Counting objects: 100% (346/346), done.
Delta compression using up to 4 threads
Compressing objects: 100% (336/336), done.
Writing objects: 100% (346/346), 1.50 MiB | 329.00 KiB/s, done.
Total 346 (delta 58), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: Heroku/python
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:! Push failed
remote:!
remote: ! ## Warning - The same version of this code has already been built: f6098f48382cfe82018384a09a28f785eb546aae
remote: !
remote: ! We have detected that you have triggered a build from source code with version f6098f48382cfe82018384a09a28f785eb546aae
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote:! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote:! Push rejected to matetask.
remote:
To https://git.heroku.com/matetask.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/matetask.git'

I am getting "ERROR: Application not supported by this buildpack!" while pushing the laravel app

I have made a BotMan app in the phpstorm platform. Whenever I push to heroku master though I added procfile, I am getting an error like this:
Counting objects: 370, done.
Compressing objects: 100% (339/339), done.
Writing objects: 100% (370/370), 571.47 KiB | 3.38 MiB/s, done.
Total 370 (delta 148), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/php.tgz
remote:
remote: ! ERROR: Application not supported by this buildpack!
remote: !
remote: ! The 'heroku/php' buildpack is set on this application, but was
remote: ! unable to detect a PHP codebase.
remote: !
remote: ! A PHP app on Heroku requires a 'composer.json' at the root of
remote: ! the directory structure, or an 'index.php' for legacy behavior.
remote: !
remote: ! If you are trying to deploy a PHP application, ensure that one
remote: ! of these files is present at the top level directory.
remote: !
remote: ! If you are trying to deploy an application written in another
remote: ! language, you need to change the list of buildpacks set on your
remote: ! Heroku app using the 'heroku buildpacks' command.
remote: !
remote: ! For more information, refer to the following documentation:
remote: ! https://devcenter.heroku.com/articles/buildpacks
remote: ! https://devcenter.heroku.com/articles/php-support#activation
remote:
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to finproj.
remote:
To https://git.heroku.com/finproj.git
! remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/finproj.git'`
I heard it has something to do with git repo. I didn't understand what that means. What's the fix for this?

Error while deploying laravel app to heroku

I was testing how to deploy an laravel app to heroku so i just created a simple app in laravel and followed this guide https://devcenter.heroku.com/articles/getting-started-with-laravel.
At first I had a problem with heroku not recognizing that my app was an php application so I added a mostly empty package.json in order for heroku to detect it as explained in this guide https://github.com/heroku/heroku-buildpack-php
Now it detects it but it still can't be deployed and shows this error:
Counting objects: 127, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (107/107), done.
Writing objects: 100% (127/127), 236.46 KiB | 0 bytes/s, done.
Total 127 (delta 14), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:
remote: ! ERROR: Failed to install system packages.
remote:
remote: Your platform requirements (for runtimes and extensions) could
remote: not be resolved to an installable set of dependencies, or a
remote: repository was unreachable.
remote:
remote: Full error information from installation attempt:
remote:
remote: > Loading repositories with available runtimes and extensions
remote: >
remote: >
remote: > [Composer\Downloader\TransportException]
remote: > The 'https://mybucket.s3.amazonaws.com/cedar-14/packages.json' URL could not be accessed: HTTP/1.1 403 Forbidden
remote: >
remote: >
remote: > install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
remote: >
remote:
remote: Please verify that all requirements for runtime versions in
remote: 'composer.lock' are compatible with the list below, and ensure
remote: all required extensions are available for the desired runtimes.
remote:
remote: For reference, the following runtimes are currently available:
remote:
remote: PHP:
remote: HHVM:
remote:
remote: For a list of supported runtimes & extensions on Heroku, please
remote: refer to: https://devcenter.heroku.com/articles/php-support
remote:
remote: ! Push rejected, failed to compile PHP app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to nameless-peak-52308.
remote: To https://git.heroku.com/nameless-peak-52308.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/nameless-peak-52308.git'
'https://mybucket.s3.amazonaws.com/cedar-14/packages.json' URL could not be accessed: HTTP/1.1 403 Forbidden
This means you need to set the permissions to public for this file/folder in AWS. I'm guessing you're logged in and you can access it fine, but Heroku can't view it because of the permissions.
I solved it by configuring heroku with this:
heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://heroku-v8js.s3.amazonaws.com/dist-cedar-14-stable/packages.json"
as explained by https://github.com/phpv8/heroku-v8js
It can be by the composer, use composer update and then add it usinggit add . then upload it to the heroku server with git push heroku master

Pushing meteor to heroku error

I am trying to push a meteor app to heroku and I am getting this error. I am using the this buildpack heroku config:set BUILDPACK_URL=https://github.com/lirbank/meteor-buildpack-horse.git
git push heroku master
Counting objects: 268, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (268/268), 3.84 MiB | 388.00 KiB/s, done.
Total 268 (delta 81), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Node.js app detected
remote: -----> Installing node
remote: -----> Installing meteor
remote: Downloading Meteor distribution
remote: ################################# 100.0%
remote: Meteor 1.2.0.2 has been installed in your home directory (~/.meteor).
remote:
remote: Now you need to do one of the following:
remote: (1) Add "$HOME/.meteor" to your path, or
remote: (2) Run this command as root:
remote: cp "/tmp/buildpack_de3e5x8d2f97747we2s5fb78436762066/meteor- fkUa/.meteor/packages/meteor-tool/1.1.9/mt-os.linux.x86_64/scripts/admin/launch- meteor" /usr/bin/meteor
remote: Then to get started, take a look at 'meteor --help' or see the docs at
remote: docs.meteor.com.
remote: -----> Bundling bundle
remote:
remote:
remote: While removing platforms:
remote: error: ios: platform is not in this project
remote: error: android: platform is not in this project
remote:
remote:
remote: ! Push rejected, failed to compile Node.js app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected
I solved the problem. So I installed both ios and android platforms into my meteor app and setup heroku config var to BUILDPACK_PRELAUNCH_METEOR.
Thanks, it worked for me like a charm.
I have a webapp and android app in the same folder.
the exact command line is:
heroku config:set BUILDPACK_PRELAUNCH_METEOR=1

Resources