Heroku: No default language could be detected for this app error thrown for node app
Heroku has a set of default buildpacks, used when it needs to detect the language of your app.
In order to do that detection, it runs the bin/detect
command of each of those default buildpacks, until one of them returns a 0 exit code.
This is the command for the node buildpack.
As you can see, it requires a package.json
to be located at the root of your app, not in a subfolder.
This is the difference causing your build to fail. You need to put your app at the root of your git repository.
heroku: no default language could be detected for this app
I can't remember how I fixed this but looking at the Date Modified
in my files after I posted this question I created two files:
runtime.txt
(thanks rurp) which contains:
python-3.5.2
Procfile
which contains:
web: gunicorn projectname.wsgi --log-file -
This is a Django project and projectname.wsgi
leads to a wsgi.py
located at
projectname/wsgi.py
This contains:
import os
import signal
import sys
import traceback
import time
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projectname.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
Heroku: No default language could be detected for this app for python even with runtime.txt
A possible solution to this problem can be specifying the buildpack during app creation like :
$ heroku create myapp --buildpack heroku/python
or after app creation like:
$ heroku buildpacks:set heroku/python
Refer Docs : Heroku Docs
The other problem I figured was that I had unnecessary package.json
and other files in my django project. I solved it by removing unnecessary files from my app directory.
Since these files were obstructing the automatic detection of buildpack.
Another reason of failed detection could be wrong folder structure of your app. The Procfile
and other heroku files should be right at the start of the git directory otherwise your app won't get detected.
Ruby-heroku No default language could be detected for this app
Gemfile
and gemfile
are different things. Rename gemfile
to Gemfile
and gemfile.lock
to Gemfile.lock
, commit that change, and deploy again.
If you're using a filesystem that doesn't distinguish between those things (like most Windows filesystems) it might be tricky to do. See Change case of a file on Windows?
Related Topics
How to Print Just the First Letters of Each Word
Python: How to Calculate the Average Word Length in a Sentence Using the .Split Command
Get All Rows That Have Same Value in Pandas
Is There a Memory Efficient and Fast Way to Load Big Json Files
Collecting and Reporting Pytest Results
Write a Program That Find the Largest Integer in a String
Get Character Position in Alphabet
Pandas Extract Numbers from Column into New Columns
Python: Searching for Common Values in Two Files
How to Download Multiple Files or an Entire Folder from Google Colab
How to Change Default Python Version
How to Code My Bot to Generate Random Images from One Command
Python Check If Website Exists
List Append Is Overwriting My Previous Values
How to Convert a 16-Bit to an 8-Bit Image in Opencv
How to Vectorize (Make Use of Pandas/Numpy) Instead of Using a Nested for Loop