I recently did an upgrade, compile, reindex, flush, clean on my magento 2.0.7 instance. Everything is working fine except on the backend interface I am getting 404 not found on anything in the pub/media/js/directory. Specifically the jscolor.js file used in the color picker on the admin backend. I checked the permissions and confirmed the files are in fact there. So I am looking for any tips on how to resolve.

chrome debug window shows its trying to access: https://myurl.com/index.php/pub/media/js/jscolor.js


  • You try to run static content deploy? Jun 26, 2016 at 8:48
  • why jscolor.js is located in media folder? Do you upload it with WYSIWYG editor? Normally all js files should be placed in pub/static folder.
    – KAndy
    Jun 26, 2016 at 10:00
  • @Khoa Yes, I did run static content deploy as well.
    – omencat
    Jun 26, 2016 at 20:19
  • @KAndy, Should it not be there? This is a magento2 installation and I didnt manually upload anything.
    – omencat
    Jun 26, 2016 at 20:20
  • did u try to give permission to the pub folder after running static content deploy ? Jun 27, 2016 at 6:13

1 Answer 1


Add app\code\Vendor\Modulename\view\frontend\requirejs-config.js

var config = {
    map: {
        '*': {
            'jsfilename': 'Vendor_Modulename/js/jsfilename'
e.g.If JS file name is jscolor.js, jsfilename = jscolor

Add jscolor.js iin below path


Run below command

chmod -R 777 var pub

php -f bin/magento setup:static-content:deploy

If still there is a 404 not found issue, remove below file and again run above command.


If you are using different theme, use theme name instead of **luma** in above command.

Your Answer

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

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