This error almost certainly means you've only defined
on the client, but not on the server. The
declaration has to also run on the server, or else the server doesn't know how to run your insert command.
Be sure you're calling
new Meteor.Collection on both the client and the server. Are you calling it inside
if (Meteor.is_client), or in a file under the
Some more details: On the server,
new Meteor.Collection defines three remote methods (
Meteor.methods) that insert, update, and remove documents in the named MongoDB collection. On the client, the same command creates an in-memory minimongo collection that lives inside the browser, and defines three stubs that simulate the methods by applying the same change to the minimongo collection. By only declaring the collection on the client, your client code runs the local insert just fine, but when it asks the server to perform the real insert, the server has no idea what method you've asked it to execute.