Hello I´m trying to use the npm package of justgage, when I imported with
import { JustGage } from ‘justgage’;
And call
new JustGage(thisGage);
Where thisGage are the options of the package I get the following error in the Browser console:
TypeError: _justgage.JustGage is not a constructor
at . (body.js:21)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:465)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:323)
at new Tracker.Computation (tracker.js:211)
at Object.Tracker.autorun (tracker.js:562)
at Blaze.View.autorun (view.js:209)
Where line 21 is the call to new JustGage(thisGage);
So you are saying you just copy and paste the script in? I think it would be much better to import it from npm. Plus you still need raphael and eve dependencies.