2

When I try to add new tax rule I am getting "require is not defined" error in console which cause properly loading issue for Tax Rate, Customer Tax Class and Product Tax Class field (see below screenshot). Any idea why I am getting this error?

enter image description here

3
  • is this only on that page? Any other pages? Have you tried deleting cache and generated folders and then compile and deploy? Commented Sep 16, 2021 at 7:04
  • Magento version number? Commented Sep 16, 2021 at 7:05
  • @KalvinKlien That is the only page. Magento version in 2.4.1. I have other magento site with same version which working fine. Not sure what happened with this one.
    – Nayem323
    Commented Sep 16, 2021 at 7:36

2 Answers 2

0

This might not apply to you, but I experienced this issue and was able to resolve it by disabling a Cloudflare feature called Rocket Loader.

The 3 require errors you're seeing are part of the html sent to the browser, but not handled by Rocket Loader. As such they execute before require is available.

I haven't seen this cause any other issues anywhere in Magento so it's a strange one.

0

Turning off Rocket Loader on Cloudflare worked for me. I was having the same issue on 2.4.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.