Issue #440Opened October 20, 2017by ateshuseyin0 reactions

Not works with jquery

Question

I use jquery in my project. After version 0.12.8 it does not work with jquery.

Prt of my webpack.config is;

resolve: {
    modules: [
      path.resolve(__dirname, 'node_modules/grapesjs/src'),
      path.resolve(__dirname, 'node_modules')
    ],
    alias: {
      'cash-dom': 'jquery'
    }
  },
  externals: {
    'jquery': 'jQuery'
  },

When I try to drop a block it throws;

ComponentsView.js:76 Uncaught TypeError: Cannot read property 'length' of undefined at child.addToCollection (ComponentsView.js:76) at child.addTo (ComponentsView.js:22) at triggerEvents (backbone.js:371) at triggerApi (backbone.js:356) at eventsApi (backbone.js:155) at child.Events.trigger (backbone.js:346) at child._onModelEvent (backbone.js:1187) at triggerEvents (backbone.js:372) at triggerApi (backbone.js:357) at eventsApi (backbone.js:155)

Answers (3)

artfOctober 23, 20170 reactions

Do you get the same error with all of your blocks? Even with some official one?

ateshuseyinOctober 24, 20170 reactions

Right. I get the same error with all blocks defined in mjml plugin.

artfOctober 24, 20170 reactions

Ok, I'd like to understand if it's something related to jquery. Are you able to reproduce it without the mjml plugin? (latest version)

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.