./launcher rebuild app error './launcher: No such file or directory'

Yes, it matters. Replace the cd /var/discourse with the actual location of your files.