Angular SSR with Nrwl/Nx – external library calls document.getElementById

In a current project I am implementing Angular server side rendering on a Nrwl/Nx workspace. I went strictly after these guidelines from Nrwl. Everything works fine until running the node application. The project contains an external library called Plotly.js which unfortunately utilizes the document. It throws the following error /Users/PATHTOPROJECT/node_modules/plotly.js/dist/plotly.js:105975 var style = document.getElementById(id); ^…

Details