Session doesn't work



I define session in my project but it doesn’t work and I keep getting this error in console:
session is not defined.

Here is my code:{
        'click.player': function () {
            var playerId = this._id;
            Session.set('selectedPlayer', playerId);

Can you please let me know what is wrong?



How did you “define session in my project”?

Did you try meteor add session?


You mean which I used is wrong and is not supported any more and i should use meteor add session function?


Session is a package. It needs adding (with meteor add session) before it can be used.