How to deploy existing app to HEROKU?

Hello everyone.

I got the main source file form developer who had previously hosted our webapp on his account, but due to cost management, we decided to deploy from our company\`s account.

He provided all the source code. and it contains following folders/files.

.git ,dist, node\_modules, public, src. .DS\_Store, babel.config, package, package-lock, README,server , vue.config.

Then I am getting the error when trying to deploy the this app to heroku.

It works locally when doing npm start, but gives error when deoplying to heroku.

These are the following steps I did

\-Create new app on HEROKU,

$ heroku login

$ cd my-project/

$ git init (this gives message “Initialized empty Git repository in D:/Others/{appname}/.git/”

$ heroku git:remote -a {appname}, doing this gives me error

” detected dubious ownership in repository at ‘D:/Others/{appname}”

Ingoring above errors and proceeding with following command

$ git add .

$ git commit -am “first”

$ git push heroku master

Then it gives me error after pushing

`-> Build failed`


`remote: We’re sorry this build is failing! You can troubleshoot common issues here:`

`remote:` [``](


`remote: Some possible problems:`


`remote: – Node version not specified in package.json`

`remote:` [``](


`remote: Love,`

`remote: Heroku`


`remote: ! Push rejected, failed to compile Node.js app.`


`remote: ! Push failed`

`remote: Verifying deploy…`


`remote: ! Push rejected to {appname}`



`! [remote rejected] master -> master (pre-receive hook declined)`

`error: failed to push some refs to`

View Reddit by Run_the_showView Source

our recommended web hosting companies


website link:


website link:

InMotion hosting

website link:


website link:

Leave a Comment

Your email address will not be published. Required fields are marked *