My hack at the moment is to actually remove the package that needs phantomjs. Because phantomjs is for sure not needed for the execution of Rocket.Chat.
#!/bin/bash
curl -SLf "https://releases.rocket.chat/0.65.2/download/" -o rocket.chat.tgz
tar xvf rocket.chat.tgz --strip 1
cd programs/server
rm -rf npm/node_modules/meteor/emojione_emojione/node_modules/grunt-contrib-qunit
Added this last line. Basically the emojione_emojione package depends on grunt-contrib-qunit in its dev dependencies, which is actually shipped in bundle. Then grunt-contrib-qunit depends on phantomjs in its direct dependencies.
I think this may be an indicator that upstream we need to be building and omitting dev Dependencies.
Looks like meteor build is blindly including dev dependencies in the build bundle when it shouldn’t be.