failed to push some refs to git@heroku.com

后端 未结 27 2287
野性不改
野性不改 2020-12-02 10:10

I am getting this error when I am trying push my files into heroku rep.

Ive set autocrlf = false already in gitconfig but this problem is still there. i have also tr

相关标签:
27条回答
  • 2020-12-02 10:38

    I had similar issue where local build was working fine however when I push my branch onto heroku it would fail to build. Issue was that I had some devDependencies in my package.json which were not installed during npm install which was causing my build to fail.

    If you need access to packages declared under devDependencies in a different buildpack or at runtime, then you can set NPM_CONFIG_PRODUCTION=false or YARN_PRODUCTION=false to skip the pruning step.

    Also you can move you devDependencies into dependencies...

    0 讨论(0)
  • 2020-12-02 10:38

    for me deleting package-lock.json fixed my problem,

    1. delete
    2. commit changes
    3. push again

    turns out Heroku accepts only one package.json file :p

    0 讨论(0)
  • 2020-12-02 10:39

    For me it started working after setting global username/email.

    To set your global username/email configuration:
    1. Open the command line.
    2. Set your username:

    git config --global user.name "FIRST_NAME LAST_NAME"
    1. Set your email address:
    git config --global user.email "MY_NAME@example.com"
    1. Commit
    git commit -m "comment"
    1. Push to heroku
    git push heroku master

    BOOM! It worked (atleast for me)

    0 讨论(0)
提交回复
热议问题