This, in turn, indicates that you probably have a footprint from KiCad v5 or you have copied a footprint from there to your personal library. Until now it has worked because
KiCad 5 libraries were installed somewhere and
${KISYS3DMOD} were defined and pointed to the KiCad 5 installation.