Nextcloud app installation - App directory "/snap//current/htdocs/apps" not found!

Currently trying to manually install an app on Nextcloud. Getting a strange error which I don’t know how to solve.

Trying to execute the following command:
sudo -u www-data php occ app:enable facerecognition

Which gives me the following error:
App directory "/snap//current/htdocs/apps" not found!

So apparently that folder is missing. However I do have a /snap/nextcloud/current/htdocs/apps folder. Strange that this is not being found. When I look into the config.php I see the following:

$snap_name = getenv('SNAP_NAME'); 'path'=> '/snap/'.$snap_name.'/current/htdocs/apps

I think the env var SNAP_NAME is missing. I cannot adjust this config.php file. Any clue how I can adjust the env vars for snap?