That error tends to mean that either your certificate or key isn’t in a PEM format with the header intact. I would start with the CERT file and make sure the first line contains -----BEGIN CERTIFICATE and see how it goes.
I would also recommend using Docker over npm and if you don’t want to manage your own certificate a reverse proxy using Lets Encrypt makes life a lot easier.