MeteorStuff / meteor-materialize-modal

A modal object with materialize styling
http://materializemodal.meteor.com
9 stars 5 forks source link

openModal is not a function #34

Open ghost opened 6 years ago

ghost commented 6 years ago

The application was working and now it's not working. This is the error:

TypeError: MaterializeModal.$modal.openModal is not a function at Blaze.TemplateInstance.<anonymous> (modal.coffee:63) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3398 at Function.Template._withTemplateInstanceFunc (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3744) at fireCallbacks (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3394) at Blaze.View.<anonymous> (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3487) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1845 at Object.Blaze._withCurrentView (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:2271) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1844 at Object.Tracker._runFlush (tracker.js?hash=0e8b5c18d543a28ce43b2f183c26b49ee62196af:548) at onGlobalMessage (meteor.js?hash=c9a34f92f28ede5a42eac467d3fa1763b624436a:448)

racosa commented 5 years ago

I had the same problem after updating Meteor to version 1.8.1 so I will post my solution here:

  1. Clone meteor-materialize-modal into the packages folder
  2. Checkout version 1.1.3: 86ff1fb71908dbe1435a58948fd7428fcc4d1b5b (maybe it works with the most recent version too but I decided to keep the one I was using before updating Meteor)
  3. Specify a coffeescript version that is compatible with your project in the file package.js (in my case the constraint was 1.0.17):
    api.use([
    'softwarerero:accounts-t9n@1.3.8',
    'coffeescript@1.0.17'
    ], ["client"]);