How to Fix Divi Editor Can’t Open Modules (TypeError: n(…) is not a function)

After migrating a Divi site to production using the All-in-One Migration plugin, I discovered that I was unable to edit any sections, rows, or modules in the Divi editor on the migrated site. In the console, I got the error:

bundle.js?ver=4.27.4:2 [React-imported-component] TypeError: n(...) is not a function

The front end of the site was fine.

I tried all of the usual tricks, including clearing caches, disabling plugins, Divi Safe Mode, resaving pages, and so on. Nothing worked.

The Solution

Finally, I decided to upload a fresh copy of the Divi theme, and that worked! I was able to edit modules again!

To do this, download the latest copy of the Divi theme from their website, then in your site go to Appearance -> Themes -> Add Theme, and have it replace the current copy.

Go back and try to edit a page now. It should work!

What Caused the Problem

I’ve never seen this problem before when using All-in-One Migration to push to a non-Divi site.

So, my theory is that when I used All-in-One Migration to upload the new site, it didn’t overwrite some files from the old Divi site, which messed things up. Hence only a fresh upload of Divi solved it. But, that’s just a guess.

Hope this was helpful to you! – Brian

Shares

4 thoughts on “How to Fix Divi Editor Can’t Open Modules (TypeError: n(…) is not a function)”

  1. Brian!…. It Worked!…. Thank you.

    The same thing happened to us over here in ‘dear old England’ and your solution solved the issue after many hours of clearing caches, disabling plugins, Divi Safe Mode, resaving pages etc.

    Thanks for posting this.

    Aiden

    Reply

Leave a Reply to Brian Shim Cancel reply