Skip to content Skip to sidebar Skip to footer

Python And Node.js On Heroku

I have started to make a Node server which runs on Heroku. It was working fine until I tried to use the (unofficial) Duolingo API. I wrote the following Python script to connect to

Solution 1:

Try to remove the deprecated heroku-buildpack-multi and use the Heroku buildpacks command:

$ heroku buildpacks:add --index 1 heroku/nodejs$ heroku buildpacks:add --index 2 heroku/python$ heroku buildpacks
=== foobar Buildpack URLs
1. heroku/nodejs
2. heroku/python

From the docs:

The buildpack for the primary language of your app should always be the last buildpack in the list. This ensures that defaults for that primary language are applied instead of those for another language, and allows Heroku to correctly detect the primary language of your app.

Solution 2:

Maybe useful for some: if you are deploying via GitHub (and not via the Heroku CLI), you can add buildpacks for other languages in your Heroku dashboard under the Settings tab .

Post a Comment for "Python And Node.js On Heroku"