How to Fix Nodejs Heroku Running into Error? - heroku

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.

Related

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'

Why is there an error when I try and commit my bot?

I'm using heroku and I'm trying to deploy my files but I keep getting this error:
$ git push heroku master
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 16 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (13/13), 1.75 KiB | 893.00 KiB/s, done.
Total 13 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
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: Verifying deploy...
remote:
remote: ! Push rejected to botver2554.
remote:
To https://git.heroku.com/botver2554.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/botver2554.git'
Can I have some help?
This is different from the suggested questions because I'm getting a buildpack error, and I don't know what it is.
It was the stupidest thing. I watched an outdated tutorial that said put no extension after requirements then I looked that you needed a requirements.txt file to continue.

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?

Gemfile.lock required. Please check it in

Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 3.82 KiB | 1.91 MiB/s, done.
Total 11 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/NoLockfile
remote:
remote: !
remote: ! Gemfile.lock required. Please check it in.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to aqueous-reaches-83684.
remote:
To https://git.heroku.com/aqueous-reaches-83684.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/aqueous-reaches-83684.git'
I want to launch my application on heroku
I always have one and the same mistake:
Gemfile.lock required. Please check it in.
I did everything according to the instructions! Deleted, downloaded, does not work anyway
Used
bundle install
Still the same error
Make sure you add your Gemfile.lock to source control.
Considering you are on master branch:
git add Gemfile.lock
git commit -m "Commit Gemfile.lock"
git push heroku master
Otherwise:
git push heroku current_branch:master
If it doesn't work, you probably have it ignored in your .gitignore file.
Remove Gemfile.lock or *.lock from your ignored list and repeat the commands above.

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