1

I am using Heroku and trying to deploy my code, but when I try to deploy I get an error.

It says it does not detect any build packs, but I have done a version check and have the latest Node.js installed.

Is there something I am missing?

terminal:

Creating app... done, ⬢ boiling-lake-07398
https://boiling-lake-07398.herokuapp.com/ | https://git.heroku.com/boiling-lake-07398.git
Shons-MacBook-Pro:Newsletter-Signup shonswope$ git push heroku master
Enumerating objects: 1305, done.
Counting objects: 100% (1305/1305), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1248/1248), done.
Writing objects: 100% (1305/1305), 1.87 MiB | 455.00 KiB/s, done.
Total 1305 (delta 179), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote:  !     No default language could be detected for this app.
remote:                         HINT: This occurs when Heroku cannot detect the buildpack to use for this a
pplication automatically.
remote:                         See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to pacific-bastion-08294.
remote: 
To https://git.heroku.com/pacific-bastion-08294.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pacific-bastion-08294.git'
Shons-MacBook-Pro:Newsletter-Signup shonswope$ npm --version
6.12.0
Shons-MacBook-Pro:Newsletter-Signup shonswope$ node --version
v12.13.0
Shons-MacBook-Pro:Newsletter-Signup shonswope$ git --version
git version 2.24.3 (Apple Git-128)
Shons-MacBook-Pro:Newsletter-Signup shonswope$ 
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

Still, following the documentation mentioned in the error message, try and set a buildpack explicitly:

heroku buildpacks:set heroku/nodejs

This situation may also occur if you remove or rename a file that previously led to the automatic detection of your application type and thus the automatic setting of the detected buildpack on your application.

Check also the answer for this question, and your package.json content.
As seen here, that package.json and Procfile must be at the root folder of your project.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250