Git Push heroku master cli - node.js

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 ?

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

fatal: fail to push some reps to my-app on heroku when trying to push node doc

strong textenter image description here
I tryied these commands to deploy heroku app but this gives an error of "failed to push some refs to my-app"
heroku create
2.git remote -v
3.git push heroku main
enter image description here

ERROR: Application not supported by 'heroku/nodejs' buildpack

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.

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

Heroku build failing, 'fatal: Not a git repository'

I'm trying to deploy my app to Heroku but keep getting the error
fatal: Not a git repository (or any parent up to mount point /tmp) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).'
Here under the commands I type
$ git branch
-> master
$ git add -A
$ git commit -m'commit'
...your branch is up to date
$ git push
everything-up-to-date
$ heroku create drumbo
Creating ⬢ drumbo... done
https://drumbo.herokuapp.com/ | https://git.heroku.com/drumbo.git
$ heroku buildpacks:set heroku/nodejs
Buildpack set. Next release on sampleapp will use heroku/nodejs.
Run git push heroku master to create a new release using this buildpack.
$ git init (added this in because of https://stackoverflow.com/questions/16853624/git-discovery-across-filesystem-not-set)
Reinitialized existing Git repository in /Users/Berta/Desktop/Codes-senior/sampleapp/.git/
$ git push heroku master
...(fails with) - fatal: Not a git repository (or any parent up to mount parent /home/kozi) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
$ git status
On branch master
your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
$ ls -A
... .git, .github ...
There's also a decent amount of verbiage about npm-merge-driver in the terminal log. Looks like the build fails right after npm install npm-merge-driver is called -
> drumbo#1.0.0 prepare /tmp/build_77f785ef804afd5c02fbe1c7b6f209fd
remote: > npm-merge-driver install
remote:
remote: fatal: Not a git repository (or any parent up to mount
point /tmp)
remote: Stopping at filesystem boundary
(GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
remote:
/tmp/build_77f785ef804afd5c02fbe1c7b6f209fd/node_modules/npm-merge-
driver/node_modules/yargs/yargs.js:1100
However when I uninstalled the npm-merge-driver, build failed because it wasn't found.
What's happening?
Two things - you need to delete the prepare line from your package.json file (should be the line referring to npm-merge-driver,
and you need to make sure you add, commit, and push your code before you run npm run deploy - should clear anything up

Resources