but right after running the command I got this error.
Composer could not find a composer.json file in /home/www/project/dist
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
ohhhh thats why it didnt install because the dist directory is fresh and empty. I got the error now. but i wonder if theres a way to put all your files into different path..
well the main requirement is to push the vendor directory into the git repo. and at first I dont really like that. i think it is required by the deployment tool and it is not allowed to run composer command on the server.
so i think what if i push a new ("dist") directory containing the composer packages ("without the dev deps") instead of the vendor directory so that I still have my vendor on my local machine being ignore with dev deps.
I know i'm late to the party, but you are probably looking for vendor-dir option in composer.json: https:// getcomposer.org/doc/06-config.md#vendor-dir
In my experience, a 'cut price' hosting solution means you have to jump through these sorts of ridiculous hoops, unnecessarily I might add simply to run and deploy your site.
If you're committing your vendor directory, don't forget to commit your node_modules too, that's what all the really cheap clients do!