wrong # args: should be "ns_mktemp ?template?"
This indicates, that you are not using NaviServer 5. What version of NaviServer and Tcl are you using?
With NaviServer 5, we see:
% set template [ns_config ns/parameters tmpdir]/nsd-XXXXXX
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-XXXXXX
% set tmpFileName [ns_mktemp $template]
[05/Nov/2025:17:16:15][26758.16f81b000][-command-] Deprecated: 'ns_mktemp /var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-XXXXXX' is deprecated since it poses a potential race condition and security risk; consider using 'ns_uuid' or 'file tempfile' instead
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-mcxy0v
%
%
% set tmpFileName [ns_mktemp -nocomplain $template]
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-WzF5Xh
...
From your post, it is not clear to me, if your setup is now working, or if you need more help.
I am currently on a boat on the Mekong in Cambodia, i might not be able to respond for a couple of days.