We have a custom Node that we are trying to add functionality to so that it can programmatically access the DOM (in our case, change the logo of the Node dynamically based on User Provided Parameters + Change the HTML Title so that the user sees their current workflow name in their browser tab). I got it all working in my browser but when I went to try it in my custom Node using document.getElementById I got the following error:
Cannot find name ‘document’. Do you need to change your target library? Try changing the
lib compiler option to include ‘dom’.
Based on research I did, it looks like for this to work ‘DOM’ needs to be added to the “lib” list in compilerOptions of tsconfig.json.
Could this be added to tsconfig.json? Or could we modify the n8n-node-dev build command to accept additional parameters like “lib” values for tsconfig.json?