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? – Khoa TruongDinh Jun 26 '16 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 '16 at 10:00
  • @Khoa Yes, I did run static content deploy as well. – omencat Jun 26 '16 at 20:19
  • @KAndy, Should it not be there? This is a magento2 installation and I didnt manually upload anything. – omencat Jun 26 '16 at 20:20
  • did u try to give permission to the pub folder after running static content deploy ? – Reena Parekh Jun 27 '16 at 6:13

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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