Meteor package working on browser but not on server

There's no problem using the Meteor package strikeout:string.js on the client side (browser JS console), but it throws an error when using it on the server side.

Checked package.js and found api.addFiles('lib/string.js', ['client','server']);, is this not sufficient?

Test code

console.log(S('jon').capitalize().s)

Error on server

ReferenceError: S is not defined

is this not sufficient? YES, you are getting the Reference because you are not requiring it.

In order to use it on the server, you should require it, on this example im using meteorhacks:npm.

It was not possible for me create a Meteorpad of this, so i will do here step-by-step.

First meteor add meteor hacks:npm

Second On the recent create packages.json add this line

{
  "string": "3.1.0"
}

Third Now just add the server code.

if (Meteor.isServer) {
  Meteor.startup(function () {
    var S = Meteor.npmRequire('string'); //server side
    console.log(S('jon').capitalize().s)
  });
}

Expected Output

I20150326-10:54:05.639(-5)? Jon

Hope it works for you.