Error Loading tmux (both 3.3a and 3.0a) - nil hostname?

Hi, can I get some pointers on how to get tmux working again?
Both versions cannot get this local “hostname” variable right. Thank you.

[nuanwen@discovery2 ~]$ module list
No modules loaded
[nuanwen@discovery2 ~]$ module load gcc/12.3.0
[nuanwen@discovery2 ~]$ module load tmux/3.3a
Lmod has detected the following error:  Unable to load module because of error when evaluating modulefile:
     /spack/2308/apps/lmod/linux-centos7-x86_64/gcc/12.3.0/tmux/3.3a.lua: [string "-- -*- lua -*-..."]:33: attempt to concatenate a nil value (local 'hostname')
     Please check the modulefile and especially if there is a the line number specified in the above message 
While processing the following module(s):
    Module fullname  Module Filename
    ---------------  ---------------
    tmux/3.3a        /spack/2308/apps/lmod/linux-centos7-x86_64/gcc/12.3.0/tmux/3.3a.lua
[nuanwen@discovery2 ~]$ module purge
[nuanwen@discovery2 ~]$ module spider tmux/3.0a

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  tmux: tmux/3.0a
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    You will need to load all module(s) on any one of the lines below before the "tmux/3.0a" module is available to load.

      gcc/8.3.0
 
    Help:
      Tmux is a terminal multiplexer. What is a terminal multiplexer? It lets
      you switch easily between several programs in one terminal, detach them
      (they keep running in the background) and reattach them to a different
      terminal. And do a lot more.
[nuanwen@discovery2 ~]$ module load gcc/8.3.0
[nuanwen@discovery2 ~]$ module list
Currently Loaded Modules:
  1) gcc/8.3.0
[nuanwen@discovery2 ~]$ module load tmux/3.0a
Lmod has detected the following error:  Unable to load module because of error when evaluating modulefile:
     /spack/apps/lmod/linux-centos7-x86_64/gcc/8.3.0/tmux/3.0a.lua: [string "-- -*- lua -*-..."]:28: attempt to concatenate a nil value (local 'hostname')
     Please check the modulefile and especially if there is a the line number specified in the above message 
While processing the following module(s):
    Module fullname  Module Filename
    ---------------  ---------------
    tmux/3.0a        /spack/apps/lmod/linux-centos7-x86_64/gcc/8.3.0/tmux/3.0a.lua