magento2: require js error in admin dashboard breaking catalog, order view

My repo is up to date on the 2.0 branch. Some of the admin dashboard areas (product/catalog, sales/orders) are broken (endless loading spinner) due to a JS error occurring in require.js because a request for /pub/static/adminhtml/Magento/backend/en_US/rjsResolver.js is returning a 404 error. I’ve checked, and this file does not exist. I’ve tried clearing the contents of the pub/static directory but it keeps happening once the files are regenerated.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 25 (4 by maintainers)

Most upvoted comments

I have successfully resolved this problems. I’am comparing the successful instalation in one of my box. by adding a line on this file vendor/magento/module-theme/view/adminhtml/requirejs-config.js the code was:

"rjsResolver": "mage/requirejs/resolver"

The same problem occurs with the plain installation (without sample data) from Magento-CE-2.1.1-2016-08-29-05-30-40.zip, and it gets solved with the same steps.

I experienced the same exact problem. Clean install of Magento Magento-CE-2.1.1_sample_data-2016-08-29-06-38-09.zip.

No issues or alerts during installation.

Right after install images, js and css missing from frontend and backend. Backend becomes completely broken.

I executed steps recommended before:

  • Manually remove pub/static/frontend and pub/static/adminhtml
  • Run bin/magento setup:static-content:deploy in the Magento root directory
  • Run bin/magento cache:clean

And it is working now.

Clearly an issue with Magento.

How come it’s not Magento issue?! Of course it is, those JS files are in adminhtml core, i.e. not in third party modules or so.

I have experienced this issue after doing migration from one dir onto another (cp -rv). Using latest Magento v2.1. In 2.0.x releases I had no such issues when moving app from development to staging environment. Using nginx as a web server, PHP 5.6.x as standalone app server and MariaDB for DB.

SOLUTION: just clear the browser cache. How stupid is this, that your server-side app fails if your browser had a cached copy of static files?! After clearing the local cache, the adminhtml doesn’t even request rjsResolver.js at all?!

@guz-anton do you have any suggestions for how to fix this then?

Hi Brendan, As about

/rjsResolver.js is returning a 404 error

There is no such file. rjsResolver is just an alias. Web page should load /pub/static/adminhtml/Magento/backend/en_US/mage/requirejs/resolver.js.

When such error occurs on your instance it means that requirejs-config.js was not generated properly or was not loaded in browser.