New installation times out and are super slow (PHP error?)

Hi. I have just set up NextCloud by the FreeNAS plugin and it kind of works, but it is very slow. Many times I get the message " 504 Gateway Time-out - nginx"

I think it might have something to do with the reports in the log, it is a lot of these repeted errors:
Error PHP Trying to access array offset on value of type null at /usr/local/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230


Anyone know what this is?