Why does Heroku fail to detect Node.js buildpack?

前端 未结 7 848
慢半拍i
慢半拍i 2020-12-14 16:18

I git cloned a Node.js application (the version specified in the package.json being 4.1.2 and that of my local machine being 6.2.2) an

7条回答
  •  有刺的猬
    2020-12-14 16:58

    I run into the same issue and tried everything, eventually realized no file would commit because they were already committed and pushed to the github repository. So you need to do the following:

    • Remove old git. folder:

    rm -rf .git

    • Create new git:

    git init

    • Add all project files:

    git add .

    • Commit:

    git commit -m “commit name”

    • Creat new heroku application:

    heroku create

    • Push code to master:

    git push heroku master

    This worked for me.

提交回复
热议问题