I recently carried out a fairly large and involved Node upgrade from version 9.11 to 12.18.3 for a handful of hosted APIs. All went pretty smoothly as we had a good idea as a team of what changes needed to be made and there was nothing too untoward, except for one thing: Parse Error: Invalid header value char
when making http requests to a third party service.
After many hours of fighting with this I discovered the issue was with malformed headers that their CDN (Incapsula) sends in the response being rejected by Node v12's stricter http parser. The solution, which is not ideal but is fine-ish for our purposes, is to use the --insecure-http-parser
build flag for Node.
This by lundibundi on the main discussion thread details the solutions and which versions of Node they work in.