Assets:precompile is giving error

Hi, I am trying to run rake assets:precompile RAILS_ENV=production
but getting error saying

brotli -f --quality=11 /Users/synup/synup/discourse/public/assets/vendor-7fd29296ee54f8a7ced9508b106a09ec4aae4912ed1cf10eceb7eb2acca03309.js --output=/Users/synup/synup/discourse/public/assets/
rake aborted!
Errno::ENOENT: No such file or directory - brotli 

Can anyone please help me

Why aren’t you using our Discourse official Standard Installation for a production instance?


Because , for heroku there is nothing mentioned and I want to install it on heroku only

Essentially you need to install brotli package at Heroku. I don’t know how to do it, but probably there’s some build-pack allowing you to do that, or you can build your own. In my case (Ubuntu 18.04@Github Actions) I’ve fixed it with sudo apt-get -yqq install brotli.