As a guess, the message could be generated by the Symfony Config Component.
It is used by Magento 2.
The method Symfony\Component\Config\Resource\FileResource::__construct()
has the following implementation:
So it definitely can generate the «The file “/composer.json” doesn’t exist».
Can you log this exception and get it backtrace?
I am unable to do it myself, because you said your production filesystem is read-only, and, as I understand, the message is generated by the production instance.