Search code examples
meteor

meteor Uncaught ReferenceError: Tracker is not defined


I'm getting the following error - Uncaught ReferenceError: Tracker is not defined

I am running meteor under windows(meteor version 0.8.3).

The code is in my templates js file.

Tracker.autorun(function (c) {
    if (MovieTrailers.find().fetch().length == 0)
        return;

    c.stop();
    PlayCurrentTrailer();
});

So far I have tried :

meteor add deps

But that didn't work.

Is tracker available under 0.8.3? or am I missing a package?


Solution

  • tracker is the new name of deps, so replace the occurrence of tracker in your code with deps and you're good to go.

    Try to avoid running older versions of Meteor to develop new code, can't you run a VM or use an online service like Nitrous.io for development purpose, as deploying a Meteor app to production in a Windows environment for the moment is not going to happen anytime soon ?