1

I am building a site with Node.js and Express.

$ git add .
$ git commit -am "Heroku"
$ heroku login
$ heroku addons:create heroku-postgresql:hobby-dev
$ git push heroku master

I am trying to deploy from Ubuntu to Heroku in the above procedure The following message & error appears.

Counting objects: 12961, done.
Compressing objects: 100% (11964/11964), done.
fatal: Out of memory, malloc failed (tried to allocate 425298626 bytes)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
fatal: write error: Bad file descriptor

Is it really a problem that there are too many files? I think Actually I do not intend to do git add. Perhaps, I think that it may be caused by having files below node_modules I did not go well after trying remove and doing the commit as follows.

git rm --cached -r node_modules/
git commit -m "remove"

Heroku's free plan seems to be available only up to 100 MB of capacity, so it seems that there is a limit to the memory that can be used, perhaps it may be the cause. However, it is difficult to sign a paid plan, I do not understand.

pekochun
  • 487
  • 1
  • 3
  • 14
  • 1
    Try [this answer](https://stackoverflow.com/questions/12481639/remove-files-from-git-commit). – xrisk Sep 03 '17 at 05:33
  • This is tangential, but _please_ don't ever make real commits with messages like "Heroku" and "remove". Those are _truly **awful**_ commit messages. Anybody needing to look at the project history (co-workers, yourself in the future, etc.) will thank you if you write useful messages instead. [This guide](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) is quite good. – ChrisGPT was on strike Sep 03 '17 at 12:49

0 Answers0