Your question must have slipped by.
bluewhale proc_open(): fork failed - Cannot allocate memory
This points to a memory limitation on your machine. Most likely you don't have swap configured and composer is unable to allocate sufficient memory to process the installation of dependencies. You could have used Google or search to look up the error:
composer/composer945
composer/composer6196
https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors
My apologies for missing this. Good luck with your nodebb installation.