Skip to content

Issue with RequireJS Path in Magento 2.4.7-p2 Fresh Setup

Iā€™m encountering a strange issue with a fresh installation of Magento 2.4.7-p2.

The problem: Some JavaScript files from RequireJS are not loading with the correct path on a simple page refresh, but they load correctly after a hard refresh. Specifically, the domReady.js file should load from this path:

pub/static/adminhtml/Magento/backend/en_US/requirejs

However, on a normal refresh, it tries to load from:

pub/static/adminhtml/Magento/backend/en_US/

Without the requirejs directory, which causes issues with admin panel elements.

Example: On a simple refresh, the domReady.js file attempts to load from the wrong directory, breaking some admin functionalities. But on a hard refresh, the file loads correctly from the proper path.

Screenshot: (Include screenshot here showing the incorrect and correct paths)

enter image description here

Has anyone else faced this issue, and is there a solution to ensure the JS files load properly on a normal refresh?

Thank you in advance!