2

After upgrading Magento from version 2.1.1 to 2.1.17, I am facing this error

Uncaught TypeError: require is not a function at editor.js:6

across admin area especially in edit pages

when I look at html -> head I see that js file

en_US/Magento_Backend/js/bootstrap/editor.js

is called first before requirejs file

Please help

Savan Patel
2,4541 gold badge19 silver badges43 bronze badges
asked Jun 25, 2019 at 9:10

1 Answer 1

2

Delete the existing require js from pub/static/_requirejs/frontend/Namespace/Theme/en_US requirejs-config.js path and refresh the page again so it will regenerate it and solve the error of js not found.

OR

Follow below steps . I think it's solve your problem

  1. Remove Your Cache
  2. Clean theme by command : grunt clean
  3. Run CMD command prompt with administrator privilege
  4. run command : grunt exec:yourthemename
  5. run command : grunt less:yourthemename
  6. run command : grunt watch

Basically working and the right solution, but with the limitations of #6367

answered Jun 25, 2019 at 9:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.