Uncaught TypeError: r is not a function


I built a plugin that registers a Gutenberg block that prints a simple Mailchimp form. The plugin works with no issues. But, if I activate Jetpack and try to edit any page or post, I get a blank screen and multiple Uncaught TypeError: r is not a function console errors such as this one with little variations:

editor.js?ver=9.1:6 Uncaught TypeError: r is not a function (https://domain.com/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.1)
    at editor.js?ver=9.1:6
    at Array.forEach (<anonymous>)
    at e.exports (editor.js?ver=9.1:6)
    at f (editor.js?ver=9.1:6)
    at Module.<anonymous> (editor.js?ver=9.1:18)
    at o (editor.js?ver=9.1:1)
    at Object.<anonymous> (editor.js?ver=9.1:18)
    at o (editor.js?ver=9.1:1)
    at editor.js?ver=9.1:1
    at editor.js?ver=9.1:1]

The index.js file in My Mailchimp block plugin imports two SCSS files so the build process is able to create the corresponding CSS files:

import './editor.scss';
import './style.scss';

I found that if I comment out the import './editor.scss' line, Jetpack stops throwing the console errors. So, it seems there’s something in my plugin that is conflicting with Jetpack.

Am I importing the SCSS files incorrectly in my code? Can someone help me, please? I’m completely lost.


leemon 2 months 0 Answers 5 views 0

Leave an answer