I am in the process of setting up a git repository and attempting to link it to Heroku. When I run the command
git push heroku master
I rec
A little late to the game, one of my issues was I had an outdated sshkey. Just need to update that in the settings.
Another thing was I was pushing Python Django CMS, and it was running python manage.py collectstatic
during deploy and it was failing. So make sure you check the log heroku logs --tail
. That gave me another hint to turn off collectstatic
, it event tells you what to type to turn it off.
Another issue could be that in a production environment, you can't use sqlite3, the default database when you make a rails app.
In order to fix this, just change the database your rails app uses to Postgres. This can easily be accomplished by editing your Gemfile
From your Gemfile, remove:
gem sqlite3;
and add the following:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Came across this same error when deploying a node app, but resolved with these two steps and thought I'd share in case anyone else runs into the same issues.
node_modules
since heroku installs dependencies from package.json on push. Try adding node_modules/
to your .gitignore
to ensure you don't accidentally commit it "devDependencies": {
"node-sass": "^4.12.0"
}
In case someone makes the same dumb mistake I did...
If you have an error in your css this error can also show up.
In one of my media queries I put
@media screen adn (min-width: 1000px) {
Instead of the "and" which gave me this error.
A good indicator that this may be the case is if you get an error that contains the message
"Tasks: TOP => assets:precompile ... Precompiling assets failed"
That was my first clue to look in my css.
Hope this helps someone!
In my case I had an npm script called "build" that had the as value npm run build --prefix client
.
Heroku automatically executes the npm run build
command and it couldn't build my React app. Probably because Heroku didn't install react-scripts module.
So I renamed the command to build-client
and now I can push the changes to Heroku.
Try Updating Node/php or any engines to latest version and then deploy again it will work for sure.