There is no specific code that is failing. When I install ANY npm package, the next time I publish the site, I get error code 500 on every dynamic page.
I am not importing anything from the npm into the code. nor am I making any changes to existing code after the npm is installed.
The existence of the npm package is triggering something.
This all started when I was attempting to install pdf generator. (pdf-generator-api-client). Everything worked great in PRVIEW, but when I published the site, that’s when the error 500 started. I have no problems in PREVIEW
I rolled back to a prior version of the site without any npm packages installed and everything works fine. I pick any npm package at the error appears.