Howdy,
I had magento 2.4 running fine but after a while of doing configuration I started getting this error in the browser console
Uncaught TypeError: require is not a function
note: I don't think it's a static file problem because all static files are getting returned from the server with status code 200
if anyone would like to see for themself
my installation is running at http://34.65.218.179/
Thanks in advance
I narrowed it down, it seems that it has something to do with the multi-website single domain configuration
Please check mod_rewrite enabled in your server and also check the directory symlinks like this in your server.
Open /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>