'https://git.heroku.com/whatsapp-clone5.git [remote rejected] main(pre-recei) failed to push some refs to 'https://git.heroku.com/whatsapp-clone5.git'

hello I'm trying to build my project for Heroku I use React.js, Node.js and MongoDB when I write those commands :

heroku login
git init
heroku git:remote -a whatsapp-clone5
git add .
git commit -am "make it better"
git push heroku main

This error appears to me



Solution 1:[1]

Heroku is likely not recognising the type of application you are pushing. Output of $ heroku logs would help diagnose the issue.

You might need to manually configure the buildpack

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bartosz Raubo