How to properly import modules?

I’m trying to use dbatools module on my scripts & dashboards. For that, I’ve explicitly added the path to the psm1 that’s on my machine (…/universaldbatools/dbatools/1.1.103/dbatools.psm1) to the “Modules” textbox on the environments.
It worked correctly for some time, but suddenly the psm1 was moved out of the specified path. Although everything still works, I now get some errors saying that some .dll are not present on the given path.
Can anyone point me to where the module might have gone? Also, is this the correct way to install/use modules? This is the only way that I’ve found since the “modules” tab requires a license.

I have an older version (2.6.1) running on a container with a mounted volume and this behavior does not happen

PSU shouldn’t be moving modules anywhere.

PSU auto-loads modules from PSModulePath. It also includes the $Repository\Modules to the PSModulePath when it starts up.

Adding modules directly to the environment should load them but I would suggest using the PSD1 rather than PSM1 in case there are RequiredAssemblies defined in the manifest. You can also adjust the PSModulePath in the environments.ps1 file using the -PSModulePath parameter of New-PSUEnvironemnt.