cancel
Showing results for 
Search instead for 
Did you mean: 

js error "Uncaught TypeError: require is not a function"

js error "Uncaught TypeError: require is not a function"

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 

2 REPLIES 2

Re: js error "Uncaught TypeError: require is not a function"

I narrowed it down, it seems that it has something to do with the multi-website single domain configuration 

Re: js error "Uncaught TypeError: require is not a function"

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>

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/