deploying node application on existing heroku app










0














I'm trying to deploy me node application which is running sucessfully running on localhost. For this, I have installed heroku cli on my machine, and I'm opening GIT cli to do the following:



  1. Heroku Login -- successful

  2. git push heroku master -- trying to push to an existing heroku app.
    I've already deleted the heroku app it is refering to. Still it is pointing to the same app.

  3. Even after reopening the git cli, it is pointing me to that and push is failing (git push heroku master)

Here the question is,



  1. How to point my git to a newly created heroku app (everytime I'm creating a new app not knowing the command to point to the existing app)

Thanks in advance.










share|improve this question

















  • 1




    4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
    – Robert Rowntree
    Nov 12 '18 at 18:39










  • Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
    – beta programmers
    Nov 12 '18 at 19:05
















0














I'm trying to deploy me node application which is running sucessfully running on localhost. For this, I have installed heroku cli on my machine, and I'm opening GIT cli to do the following:



  1. Heroku Login -- successful

  2. git push heroku master -- trying to push to an existing heroku app.
    I've already deleted the heroku app it is refering to. Still it is pointing to the same app.

  3. Even after reopening the git cli, it is pointing me to that and push is failing (git push heroku master)

Here the question is,



  1. How to point my git to a newly created heroku app (everytime I'm creating a new app not knowing the command to point to the existing app)

Thanks in advance.










share|improve this question

















  • 1




    4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
    – Robert Rowntree
    Nov 12 '18 at 18:39










  • Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
    – beta programmers
    Nov 12 '18 at 19:05














0












0








0







I'm trying to deploy me node application which is running sucessfully running on localhost. For this, I have installed heroku cli on my machine, and I'm opening GIT cli to do the following:



  1. Heroku Login -- successful

  2. git push heroku master -- trying to push to an existing heroku app.
    I've already deleted the heroku app it is refering to. Still it is pointing to the same app.

  3. Even after reopening the git cli, it is pointing me to that and push is failing (git push heroku master)

Here the question is,



  1. How to point my git to a newly created heroku app (everytime I'm creating a new app not knowing the command to point to the existing app)

Thanks in advance.










share|improve this question













I'm trying to deploy me node application which is running sucessfully running on localhost. For this, I have installed heroku cli on my machine, and I'm opening GIT cli to do the following:



  1. Heroku Login -- successful

  2. git push heroku master -- trying to push to an existing heroku app.
    I've already deleted the heroku app it is refering to. Still it is pointing to the same app.

  3. Even after reopening the git cli, it is pointing me to that and push is failing (git push heroku master)

Here the question is,



  1. How to point my git to a newly created heroku app (everytime I'm creating a new app not knowing the command to point to the existing app)

Thanks in advance.







node.js git heroku heroku-cli






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 '18 at 18:21









beta programmers

268




268







  • 1




    4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
    – Robert Rowntree
    Nov 12 '18 at 18:39










  • Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
    – beta programmers
    Nov 12 '18 at 19:05













  • 1




    4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
    – Robert Rowntree
    Nov 12 '18 at 18:39










  • Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
    – beta programmers
    Nov 12 '18 at 19:05








1




1




4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
– Robert Rowntree
Nov 12 '18 at 18:39




4 steps recommended in link may help u out with the cache - coderwall.com/p/jjcpra/clean-heroku-npm-cache
– Robert Rowntree
Nov 12 '18 at 18:39












Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
– beta programmers
Nov 12 '18 at 19:05





Thanks, The following command helped and resolved that particular issue -------- heroku config:unset CACHE
– beta programmers
Nov 12 '18 at 19:05













2 Answers
2






active

oldest

votes


















1














The easier way to add your heroku app remote reference is running the command below from your git folder:



heroku git:remote -a name-of-your-heroku-app


to verify if the remote heroku ref was correctly added you can run:



git remote -v





share|improve this answer




























    0














    When running the application using the heroku open command, facing the following issue. Any clue where i went wrong..?



    2018-11-12T18:59:19.888307+00:00 app[api]: Scaled to web@1:Free by user *********@email.com
    2018-11-12T18:59:19.867050+00:00 app[api]: Deploy 77ec2d50 by user *************@email.com
    2018-11-12T18:59:25.456322+00:00 heroku[web.1]: Starting process with command node mp3.js
    2018-11-12T18:59:29.846039+00:00 heroku[web.1]: State changed from starting to crashed
    2018-11-12T18:59:29.848349+00:00 heroku[web.1]: State changed from crashed to starting
    2018-11-12T18:59:29.804086+00:00 heroku[web.1]: Process exited with status 127
    2018-11-12T18:59:29.620089+00:00 app[web.1]: bash: node: command not found






    share|improve this answer




















    • Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
      – Saulo
      Nov 12 '18 at 19:13










    • No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
      – beta programmers
      Nov 12 '18 at 19:15










    • That's the problem! You must have the package.json file. Have you created your app using npm init?
      – Saulo
      Nov 12 '18 at 19:16










    • If you use npm init you will start a wizard to create your package.json!
      – Saulo
      Nov 12 '18 at 19:17






    • 1




      If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
      – Saulo
      Nov 12 '18 at 19:19










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267955%2fdeploying-node-application-on-existing-heroku-app%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The easier way to add your heroku app remote reference is running the command below from your git folder:



    heroku git:remote -a name-of-your-heroku-app


    to verify if the remote heroku ref was correctly added you can run:



    git remote -v





    share|improve this answer

























      1














      The easier way to add your heroku app remote reference is running the command below from your git folder:



      heroku git:remote -a name-of-your-heroku-app


      to verify if the remote heroku ref was correctly added you can run:



      git remote -v





      share|improve this answer























        1












        1








        1






        The easier way to add your heroku app remote reference is running the command below from your git folder:



        heroku git:remote -a name-of-your-heroku-app


        to verify if the remote heroku ref was correctly added you can run:



        git remote -v





        share|improve this answer












        The easier way to add your heroku app remote reference is running the command below from your git folder:



        heroku git:remote -a name-of-your-heroku-app


        to verify if the remote heroku ref was correctly added you can run:



        git remote -v






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 '18 at 19:08









        Saulo

        809




        809























            0














            When running the application using the heroku open command, facing the following issue. Any clue where i went wrong..?



            2018-11-12T18:59:19.888307+00:00 app[api]: Scaled to web@1:Free by user *********@email.com
            2018-11-12T18:59:19.867050+00:00 app[api]: Deploy 77ec2d50 by user *************@email.com
            2018-11-12T18:59:25.456322+00:00 heroku[web.1]: Starting process with command node mp3.js
            2018-11-12T18:59:29.846039+00:00 heroku[web.1]: State changed from starting to crashed
            2018-11-12T18:59:29.848349+00:00 heroku[web.1]: State changed from crashed to starting
            2018-11-12T18:59:29.804086+00:00 heroku[web.1]: Process exited with status 127
            2018-11-12T18:59:29.620089+00:00 app[web.1]: bash: node: command not found






            share|improve this answer




















            • Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
              – Saulo
              Nov 12 '18 at 19:13










            • No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
              – beta programmers
              Nov 12 '18 at 19:15










            • That's the problem! You must have the package.json file. Have you created your app using npm init?
              – Saulo
              Nov 12 '18 at 19:16










            • If you use npm init you will start a wizard to create your package.json!
              – Saulo
              Nov 12 '18 at 19:17






            • 1




              If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
              – Saulo
              Nov 12 '18 at 19:19















            0














            When running the application using the heroku open command, facing the following issue. Any clue where i went wrong..?



            2018-11-12T18:59:19.888307+00:00 app[api]: Scaled to web@1:Free by user *********@email.com
            2018-11-12T18:59:19.867050+00:00 app[api]: Deploy 77ec2d50 by user *************@email.com
            2018-11-12T18:59:25.456322+00:00 heroku[web.1]: Starting process with command node mp3.js
            2018-11-12T18:59:29.846039+00:00 heroku[web.1]: State changed from starting to crashed
            2018-11-12T18:59:29.848349+00:00 heroku[web.1]: State changed from crashed to starting
            2018-11-12T18:59:29.804086+00:00 heroku[web.1]: Process exited with status 127
            2018-11-12T18:59:29.620089+00:00 app[web.1]: bash: node: command not found






            share|improve this answer




















            • Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
              – Saulo
              Nov 12 '18 at 19:13










            • No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
              – beta programmers
              Nov 12 '18 at 19:15










            • That's the problem! You must have the package.json file. Have you created your app using npm init?
              – Saulo
              Nov 12 '18 at 19:16










            • If you use npm init you will start a wizard to create your package.json!
              – Saulo
              Nov 12 '18 at 19:17






            • 1




              If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
              – Saulo
              Nov 12 '18 at 19:19













            0












            0








            0






            When running the application using the heroku open command, facing the following issue. Any clue where i went wrong..?



            2018-11-12T18:59:19.888307+00:00 app[api]: Scaled to web@1:Free by user *********@email.com
            2018-11-12T18:59:19.867050+00:00 app[api]: Deploy 77ec2d50 by user *************@email.com
            2018-11-12T18:59:25.456322+00:00 heroku[web.1]: Starting process with command node mp3.js
            2018-11-12T18:59:29.846039+00:00 heroku[web.1]: State changed from starting to crashed
            2018-11-12T18:59:29.848349+00:00 heroku[web.1]: State changed from crashed to starting
            2018-11-12T18:59:29.804086+00:00 heroku[web.1]: Process exited with status 127
            2018-11-12T18:59:29.620089+00:00 app[web.1]: bash: node: command not found






            share|improve this answer












            When running the application using the heroku open command, facing the following issue. Any clue where i went wrong..?



            2018-11-12T18:59:19.888307+00:00 app[api]: Scaled to web@1:Free by user *********@email.com
            2018-11-12T18:59:19.867050+00:00 app[api]: Deploy 77ec2d50 by user *************@email.com
            2018-11-12T18:59:25.456322+00:00 heroku[web.1]: Starting process with command node mp3.js
            2018-11-12T18:59:29.846039+00:00 heroku[web.1]: State changed from starting to crashed
            2018-11-12T18:59:29.848349+00:00 heroku[web.1]: State changed from crashed to starting
            2018-11-12T18:59:29.804086+00:00 heroku[web.1]: Process exited with status 127
            2018-11-12T18:59:29.620089+00:00 app[web.1]: bash: node: command not found







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 12 '18 at 19:09









            beta programmers

            268




            268











            • Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
              – Saulo
              Nov 12 '18 at 19:13










            • No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
              – beta programmers
              Nov 12 '18 at 19:15










            • That's the problem! You must have the package.json file. Have you created your app using npm init?
              – Saulo
              Nov 12 '18 at 19:16










            • If you use npm init you will start a wizard to create your package.json!
              – Saulo
              Nov 12 '18 at 19:17






            • 1




              If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
              – Saulo
              Nov 12 '18 at 19:19
















            • Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
              – Saulo
              Nov 12 '18 at 19:13










            • No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
              – beta programmers
              Nov 12 '18 at 19:15










            • That's the problem! You must have the package.json file. Have you created your app using npm init?
              – Saulo
              Nov 12 '18 at 19:16










            • If you use npm init you will start a wizard to create your package.json!
              – Saulo
              Nov 12 '18 at 19:17






            • 1




              If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
              – Saulo
              Nov 12 '18 at 19:19















            Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
            – Saulo
            Nov 12 '18 at 19:13




            Hmmm ... It seems heroku is not recognising your app as a node application. Do you have package.json in the root of your project?
            – Saulo
            Nov 12 '18 at 19:13












            No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
            – beta programmers
            Nov 12 '18 at 19:15




            No. I can see package-lock.json which got auto created at the time of project creation. There's no package.json
            – beta programmers
            Nov 12 '18 at 19:15












            That's the problem! You must have the package.json file. Have you created your app using npm init?
            – Saulo
            Nov 12 '18 at 19:16




            That's the problem! You must have the package.json file. Have you created your app using npm init?
            – Saulo
            Nov 12 '18 at 19:16












            If you use npm init you will start a wizard to create your package.json!
            – Saulo
            Nov 12 '18 at 19:17




            If you use npm init you will start a wizard to create your package.json!
            – Saulo
            Nov 12 '18 at 19:17




            1




            1




            If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
            – Saulo
            Nov 12 '18 at 19:19




            If you are working on your first node app for Heroku I'd strongly recommend you follow this article: devcenter.heroku.com/articles/deploying-nodejs
            – Saulo
            Nov 12 '18 at 19:19

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267955%2fdeploying-node-application-on-existing-heroku-app%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto