In K2 5.9, SmartForms JavaScript bundling and minification relies on Node.js resources that are extracted to the application pool service account's temporary profile directory:
C:\Users\<AppPoolServiceAccount>\AppData\Local\Temp\SourceCode.Forms.Utilities.NodeJS
While this design functions as intended, it can be negatively impacted by enterprise management, security, or antivirus solutions that routinely clean or remediate content within user profile temporary directories.
In our environment, a disk cleanup process removed portions of the extracted Node.js dependencies while leaving the active executables intact. Following a server reboot, K2 attempted to reuse the existing extraction folder, but required dependencies were no longer present. This resulted in failures during JavaScript bundling/minification, causing SmartForms resources to return errors and pages to load blank or fail to render.
Requested Enhancement
Move the extracted Node.js runtime and supporting SmartForms bundling resources from the user profile temporary directory to a more permanent application location, for example somewhere within:
C:\Program Files\K2\
Benefits
Reduces risk of accidental deletion by enterprise disk cleanup tools.
Minimizes impact from antivirus or endpoint management agents that target temporary directories.
Eliminates the need for administrators to create exclusions or whitelisting rules for service account temp folders.
Improves platform resiliency across server reboots and maintenance activities.
Aligns critical application dependencies with standard application installation locations rather than transient user-specific locations.
Additional Consideration
As a further enhancement, K2 could validate the completeness of the Node.js runtime and associated dependencies during startup. If any required files are missing or corrupted, the platform could automatically re-extract the package rather than relying solely on the existence of node.exe. This would provide additional protection against partial file deletion and improve self-healing capabilities.