0

I am using Magento 2.4.1 CE. I am not sure what changed, but since about a week when I create my static files the front- and backend break because two folders including important files are missing (e.h. mixins.js require.js) and the javascript files crash.

I have checked all the files and realized that every file and folder is available except the "mage" folder. I use the bin/magento s:s:d -f command.

So whats missing is

pub/static/frontend/theme/name/de_De/mage/

and

pub/static/adminhtml/theme/name/de_De/mage/

I have found a workaround by manually uploading the two mage folders from an old stage server into the static theme folders. Then both back- and frontend are fine. This however works only until the next static deployment of course...

I have already checked my file permissions, but since I did not change them, I don't think it has something to do with it.

When I try to open the files by URL as in this example de_DE/mage/requirejs/mixins.js I get the following error message:

 Unable to resolve the source file for 'frontend/theme/name/de_DE/mage/requirejs/mixins.js'
<pre> #1 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#2 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\StaticResource#0000000069ad91c00000000031b30d8d#) called at [pub/static.php:13] 
</pre> 
3
  • 1
    could it be that the original files are no longer exist? did you check the location of it? (lib folder, not pub/static)
    – Jimmy
    Apr 7, 2021 at 2:17
  • 1
    It turns out that this was indeed the case, thanks a lot for the hint! Only the mage folder was all empty and I have no clue why since I would never touch the lib folder. Would you like to make it an official answer?
    – TheFrakes
    Apr 9, 2021 at 7:45
  • No need :D you can post the answer yourself :D
    – Jimmy
    Apr 9, 2021 at 8:45

1 Answer 1

0

As Jimmy pointed out, the original files did no longer exist. Must have been an accident of someone deleting the folder.

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.