Meteor-Community-Packages / meteor-simple-schema

Meteor integration package for simpl-schema
https://github.com/Meteor-Community-Packages/meteor-simple-schema
MIT License
919 stars 161 forks source link

TypeError: Cannot read property '_schema' of undefined #701

Closed prasanth-cubettech closed 6 years ago

prasanth-cubettech commented 7 years ago

When I compile SimpleSchema object in meteor mongo collection file. I'm getting errors contain _schema of undefined. Roles.Schema = new SimpleSchema({ name: { type: String }, name: { type: String }, code: { type: String }, permissions: { type: [] }, active: { type: Boolean }, createdAt: { type: Date }, updatedAt: { type: Date } });

Error:

TypeError: Cannot read property '_schema' of undefined W20170522-15:39:55.898(5.5)? (STDERR) at packages/aldeed_simple-schema.js:1066:16 W20170522-15:39:55.898(5.5)? (STDERR) at Function._.each._.forEach (packages/underscore.js:147:22) W20170522-15:39:55.898(5.5)? (STDERR) at expandSchema (packages/aldeed_simple-schema.js:1049:5) W20170522-15:39:55.899(5.5)? (STDERR) at packages/aldeed_simple-schema.js:1190:32 W20170522-15:39:55.899(5.5)? (STDERR) at Array.forEach (native) W20170522-15:39:55.899(5.5)? (STDERR) at Function._.each._.forEach (packages/underscore.js:139:11) W20170522-15:39:55.899(5.5)? (STDERR) at mergeSchemas (packages/aldeed_simple-schema.js:1183:5) W20170522-15:39:55.899(5.5)? (STDERR) at [object Object].SimpleSchema (packages/aldeed_simple-schema.js:1406:18) W20170522-15:39:55.899(5.5)? (STDERR) at meteorInstall.imports.api.users.roles.js (imports/api/users/roles.js:31:13) W20170522-15:39:55.899(5.5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:197:9)

aldeed commented 6 years ago

The Meteor SimpleSchema package is no longer maintained other than critical fixes to keep it running with each latest Meteor release. Closing non-critical issues in this repo. Anyone who cares about this may do one or more of the following: