when I add color picker to admin system configuration i got this kind of error can any one know about how can I rsolve it.enter image description here


2 Answers 2


As per your error you want to add adminhtml_system_config_edit.xml on path Vendor/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml in your module and add below code:

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left"
        <css src="jquery/colorpicker/css/colorpicker.css"/>

if you used <link src="jquery/colorpicker/js/colorpicker.js"/> on head tag on above file then remove it.

then run the basic CLI commands and check.


As per magento 2 standards, you will required requirejs-config.js to add custom javascript Create requirejs-config.js in app/code/vendor/module-name/view/adminhtml/requirejs-config.js

    var config = {
map: {
    '*': {


then create custom.js : app/code/Vendor/modulename/view/adminhtml/web/js

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.