Unable to use Meteorhacks:SSR inside a private package

Any insights appreciate into challenges I am having using the Meteorhacks:SSR package, package is defined in my package.js

], ‘server’) ;

When I use SSR server side (server/sendemail.js) as below

SSR.compileTemplate( ‘htmlEmail’, Assets.getText(‘private/passwordResetPlainText.html’));

I get the below error

Exception while invoking method ‘sendEmail’ TypeError: Object # Object> has no method ‘compileTemplate’

When you added the file to your package, did you specify that it is server-only?

I did…

], ‘server’) ;


Right, I’m talking about when you added server/sendemail.js with api.addFiles.

I did…

], ‘server’);

Well, I’m out of ideas :stuck_out_tongue:

Yeah me too, thanks anyways!

Is SSR defined on the server?

You can start a meteor shell and type SSR to check.

If not, try using api.imply('meteorhacks:ssr'); in your package.js to ensure its exports are available to your app.

SSR is definitely defined on Server. When I get all methods on the SSR I get only the


Here is my output

[ ‘render’ ]

For some reasons it only finds the render method and not the compilTemplate method. I am using SSR in a login “private” package which is used by main app.


Looks like the package is resolved to an old version. Can you check your .meteor/versions file, which version is resolved for meteorhacks:ssr? if you will see something like meteorhacks:ssr@1.0.0, just change the line to meteorhacks:ssr@2.1.1 after that everything will be smooth… Give me know, cheers.


well done it solves the issue :slight_smile:
just use meteorhacks:ssr@2.1.1 and It will work :slight_smile: