fastr.de
fastr.de

Reputation: 1525

Meteor (mrt) package loaded but "Model is not defined" error occured

I installed the models package from Atmosphere via mrt.

meteor add models

says models: already using.

when I insert a console.log statement in the model.js file located at this package it get executed and logged before the error occured.

I2036-22:23:13.047(1)? MODEL LOADING     <-- (my console.log)
W2036-22:23:13.054(1)? (STDERR) /home/user/.meteor/tools/0b2f28e18b/lib/node_modules/fibers/future.js:173
W2036-22:23:13.054(1)? (STDERR)                         throw(ex);
W2036-22:23:13.055(1)? (STDERR)                               ^
W2036-22:23:13.057(1)? (STDERR) ReferenceError: Model is not defined

any idea why this happen?

Upvotes: 0

Views: 123

Answers (1)

Hubert OG
Hubert OG

Reputation: 19544

The package seems to be not updated to use with Meteor 0.6.5 and later. In that version the smart package API has changed, so older packages can no longer be used without a (simple) update.

The package in question seem to be only an experiment, quote:

This is a basic proof of concept of the way meteor models could work

Are you sure you need it for your task?

If so, you should clone that package and update the package.js file to use api.export method. Alternatively, if you just want to experiment, you can specify Meteor release in your project to be less than 0.6.5.

Upvotes: 1

Related Questions