Reputation: 17332
I have a meteor-package like this:
Package.describe({
name: 'name:anything',
summary: 'example package',
version: '0.0.1',
documentation: "README.md"
});
Package.onUse(function(api){
api.versionsFrom('[email protected]');
api.use(['templating', 'mongo']);
api.use(['iron:[email protected]'], 'client');
api.addFiles(['lib/client/anything.js'], ['client']);
api.export('App');
});
In lib/client/anything.js
I wrote the lines
App = {};
App.Mode = {};
App.Mode._dep = new Tracker.Dependency();
I added the anything.js file in the package.js and I export the app-var - like you see it above.
But I get the error Uncaught ReferenceError: Tracker is not defined
So what am I doing wrong?
Upvotes: 2
Views: 572
Reputation: 22696
The tracker
package needs to be api.use
d in your package to be able to reference Tracker
.
api.use(['templating', 'mongo', 'tracker']);
Upvotes: 2