I have an app create in Heroku with a free account.
It's my first Nextjs app. I have created a few react apps and deployed them successfully using the https://github.com/mars/create-react-app-buildpack buildpack,
I am attempting to use the https://github.com/mars/heroku-nextjs.git buildpack. I continue to get the following error when pushing and attempting to build:
Enumerating objects: 695, done.
Counting objects: 100% (695/695), done.
Delta compression using up to 4 threads
Compressing objects: 100% (638/638), done.
Writing objects: 100% (695/695), 406.94 KiB | 1.78 MiB/s, done.
Total 695 (delta 388), reused 20 (delta 13)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: https://github.com/mars/heroku-nextjs.git
remote: -----> App not compatible with buildpack: https://github.com/mars/heroku-nextjs.git
remote: bash: /tmp/codon/tmp/buildpacks/cc998aa50faebde1ea66717737aec22c884e4936/bin/detect: No such file or directory
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: b1006412ec2d412e7edaed795dcbceff02d98f82
remote: !
remote: ! We have detected that you have triggered a build from source code with version b1006412ec2d412e7edaed795dcbceff02d98f82
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to gurnzapp-test.
I have read everything I can find online about this. The most common error that is in the github issues is that people put package.json in a subdirectory. My package.json is in the root. My project is set up correctly as far as I can tell.
I have tried:
- pushing from the
mainbranch directly to heroku's main branch. - pushing from a local development branch in the
git push heroku development:mainformat. - removeing package-lock.json.
- Using another buildpack: https://github.com/ryanbahniuk/nextjs-buildpack.git
I'm at a loss as to why I'd have issues building. Any help would be amazing :D