This was it! I installed npm ci and then I got further.
I still had issues running the command without root privileges and root could not access the file /tmp/contact-summary.js.
I was wondering from the beginning why my entire cht-core folder belonged to root. So I solved this issue by changing the owner of all cht related files to ubuntu user.
I wonder if this is standard or if I did something wrong, I will check.
Typically the owner of the cht-core directory/files would be whatever user that you used to run the git clone... command to initially download the repository. If you happened to run sudo git clone... then that would probably have assigned the cht-core directory/files to root.