I recently developed a Meteor package called Wiki.
Within the package, I included a wiki.html file that contains:
<template name="wiki">
FULL WIKI UI CODE HERE
</template>
Next, I created a wiki.js file where I defined my collections and events. However, while working on this file, I encountered an error:
Uncaught TypeError: Cannot read property 'helpers' of undefined
Exception in defer callback: Error: No such template: wiki
I am confused as I already have a wiki template set up. In my package.js, here is how I configured it:
Package.onUse(function(api) {
api.versionsFrom('1.2.1');
api.use('ecmascript');
api.use('templating', 'client');
api.use('easy:search', 'client');
api.use('templates:tabs', 'client');
api.use('blaze-html-templates', 'client');
api.addFiles('wiki.js', 'client');
api.addFiles('wiki.html', 'client');
api.addFiles('wikiserver.js', 'server');
});
Can anyone point out what I might be missing causing the template wiki not to be recognized? Interestingly, if I delete all content within my JS file, everything seems to work fine. Any assistance would be highly appreciated.