dependencies - Why the Meteor package ian:accounts-ui-bootstap-3 is behaving differently if is installed as a dependency? -
i'm trying create meteor package, has, dependency package ian:accounts-ui-bootstrap-3. added dependency in package.js this:
package.onuse(function(api) { api.versionsfrom('1.1.0.2'); api.use(['ian:accounts-ui-bootstrap-3'], 'client'); api.addfiles('package-name.js'); });
after add package in console, following packages added project:
accounts-base added, version 1.2.0 me:my-package-name added, version 0.0.1 handlebars added, version 1.0.3 ian:accounts-ui-bootstrap-3 added, version 1.0.7 localstorage added, version 1.0.3 service-configuration added, version 1.0.4 stylus added, version 1.0.7
the issue accounts system not working. in browser error:
uncaught typeerror: cannot read property 'push' of undefined
'push' being property of
template.__body__.__contentparts
if add ian:accounts-ui-bootstrap-3 manually works fine, don't error. when that, packages installed on project little different:
accounts-base added, version 1.2.0 anti:i18n added, version 0.4.3 ian:accounts-ui-bootstrap-3 added, version 1.2.59 localstorage added, version 1.0.3 service-configuration added, version 1.0.4 stylus added, version 1.0.7
as can see don't have handlebars anymore instead anti:i18n. tried install anti:i18n dependency in package got same browser error.
can say, i'm doing wrong , why package behaves when installed differently (manual vs dependency). give example created empty package, dependency, nothing else can affect number of packages being installed.
try using 'imply' instead of 'use'. exposes package global scope. without more in details of problem solve issue (i hope):
api.imply(['ian:accounts-ui-bootstrap-3']);
instead of
api.use(['ian:accounts-ui-bootstrap-3'], 'client');
Comments
Post a Comment