Pushing to Heroku

So I am facing the problem that I can not push it to heroku. I installed mediasoup and it’s working fine, I also installed pip, python. But this error popsup and I don’t know what to do. I am working on Ubuntu.

remote:        npm ERR! code 1
remote:        npm ERR! path /tmp/build_7941d4ce/node_modules/mediasoup
remote:        npm ERR! command failed
remote:        npm ERR! command sh -c node npm-scripts.js postinstall
remote:        npm ERR! npm-scripts.js [INFO] running task "postinstall"
remote:        npm ERR! npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
remote:        npm ERR! npm-scripts.js [INFO] running task "worker:build"
remote:        npm ERR! npm-scripts.js [INFO] executing command: make -C worker
remote:        npm ERR! make: Entering directory '/tmp/build_7941d4ce/node_modules/mediasoup/worker'
remote:        npm ERR! # Updated pip and setuptools are needed for meson
remote:        npm ERR! # `--system` is not present everywhere and is only needed as workaround for
remote:        npm ERR! # Debian-specific issue (copied from
remote:        npm ERR! # https://github.com/gluster/gstatus/pull/33), fallback to command without
remote:        npm ERR! # `--system` if the first one fails.
remote:        npm ERR! /usr/bin/python3 -m pip install --system --target=/tmp/build_7941d4ce/node_modules/mediasoup/worker/out/pip pip setuptools || \
remote:        npm ERR!         /usr/bin/python3 -m pip install --target=/tmp/build_7941d4ce/node_modules/mediasoup/worker/out/pip pip setuptools || \
remote:        npm ERR!         echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
remote:        npm ERR! Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package
remote:        npm ERR! # Install `meson` and `ninja` using `pip` into custom location, so we don't
remote:        npm ERR! # depend on system-wide installation.
remote:        npm ERR! /usr/bin/python3 -m pip install --upgrade --target=/tmp/build_7941d4ce/node_modules/mediasoup/worker/out/pip  meson ninja
remote:        npm ERR! make: Leaving directory '/tmp/build_7941d4ce/node_modules/mediasoup/worker'
remote:        npm ERR! /usr/bin/python3: No module named pip
remote:        npm ERR! /usr/bin/python3: No module named pip
remote:        npm ERR! /usr/bin/python3: No module named pip
remote:        npm ERR! make: *** [Makefile:65: meson-ninja] Error 1
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.C08YB/_logs/2022-04-03T15_58_35_675Z-debug-0.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        Some possible problems:
remote:        
remote:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:        
remote:        Love,
remote:        Heroku

Python is saying very clearly: “No module named pip”. You can check manually: python3 -m pip. Normally this should display pip’s help.

This doesn’t make any sence. I can run it locally without any errors, but when I try to push it to heroku it fails and shows this error.

And I don’t know what else to do.
Tried requirements.txt too

Well, remote Python doesn’t have pip installed. It tells that itself. Obviously, you have to find a way of installing the pip module there, not locally

But how should I install Python & Pip on Heroku

If this is not possible, then some other special installation method is necessary for Heroku.

That’s not a question about mediasoup, right?

Mediasoup won’t work on Heroku.

You could probably fix the pip error by customizing the buildpack, but there’s no point because Heroku won’t route any WebRTC related traffic to your dyno.

You’re better off using something like Digital Ocean or Vultr.

1 Like