Inserting in mongo DB

hi everyone,
i have done inserting data in mongo collections earlier but since last update 1.6 version, i am unable to do inserting.
getting this error. anyone have any idea whats happening here.

uncaught TypeError: Cannot read property ‘insert’ of undefined
at Object.submit #sign_up (main.js:31)

What Meteor version did you upgrade from?

I upgraded from 1.5.2.2

Looks like your Collection is not defined.

Put a breakpoint on the collection creation and another at your insert. Make sure the collection has been properly created before you use it.

1 Like
1 Like

So you’ve been on a recent version.

Did you remove any package that might have been implying the reference to your collection, or changed the way you load files in packages (i.e. lazy loading, using imports and main.js)?

As @brucejo says, your collection is not defined. So you need to either 1) depend explicitly on the package exporting the global variable, or 2) import it from the package where it is being defined.