ERROR: Application not supported by 'heroku/nodejs' buildpack - node.js

I type:
git push heroku master
and I get:
The file package.json is present here
I've tried:
heroku buildpacks:set heroku/nodejs
And I still get the error.
This is the repo branch.

git push heroku [local branch name]:master
If I don't specify the local branch name. Heroku will automatically deploy from local master. That branch doesn't have a package.json file. That's why I got the error.

Related

https://git.heroku.com/whatsapp-clone5.git [remote rejected] main(pre-recei) failed to push some refs to 'https://git.heroku.com/whatsapp-clone5.git'

hello I'm trying to build my project for Heroku
I use React.js, Node.js and MongoDB
when I write those commands :
heroku login
git init
heroku git:remote -a whatsapp-clone5
git add .
git commit -am "make it better"
git push heroku main
This error appears to me
Heroku is likely not recognising the type of application you are pushing. Output of $ heroku logs would help diagnose the issue.
You might need to manually configure the buildpack

How to update Heroku along with Github after the first time commit and creating Heroku app?

I have created my Heroku app via github with first commit by following commands.
git init
git add .
git commit -m "my first commit"
heroku login
heroku create
git push heroku HEAD:master
My app got created successfully. But I don't know which commands to use after then - if again i want to deploy it after making some changes in my existing code? What are the exact commands then for github and heroku both respectively.
You can re-deploy your app with the same commands you have done before.
Commands
git add .
git commit -m "new commit"
git push heroku master
Use git push for GitHub

heroku: Node version not specified in package.json

I'm trying to push my back-end and front-end with git push heroku HEAD:master and getting such error:
What causes this error?
Here you can check my package.json file:

Error while pushing from bitbucket repo to heroku. It says my repo is a shallow clone

I created a pipeline to deploy my code from Bitbucket repo to Heroku server.
my bitbucket-pipelines.yml
image: node:10.15.3
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- npm install
- git push https://heroku:<my heroku api key>#git.heroku.com/<my heroku app's name>.git HEAD
After pushing my code to my bitbucket repo, the pipeline runs, but fails while pushing the code to heroku git.
Below is the error:
Push rejected, source repository is a shallow clone. Unshallow it with `git fetch --all --unshallow` and try pushing again.
But then by bit bucket repo is not shallow. The command git rev-parse --is-shallow-repository returns false.
You can use the following git command before the push
git filter-branch -- --all
So it would be in your script:
...
- git filter-branch -- --all
- git push https://heroku:<my heroku api key>#git.heroku.com/<my heroku app's name>.git HEAD

Git Push heroku master cli

git push heroku master
error: src refspec master does not match any
error: failed to push some refs to 'https://git.heroku.com/infinite-ravine-36658.git'
I ran into this problem, should i just move it without Heroku ?

Resources