在SimpleSchema上崩溃

时间:2016-10-23 14:03:01

标签: meteor simple-schema

我正在执行Intermediate meteor tutorial #6,我定义了一个SimpleSchema Recipes。但该应用程序正在崩溃。我明白了:

/home/**/.meteor/packages/meteor-tool/.1.4.1_3.1a0sscb++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
                    throw(ex);
                    ^

Error: Invalid definition for name field.
    at packages/aldeed_simple-schema/simple-schema.js:457:1
    at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
    at [object Object].SimpleSchema (packages/aldeed_simple-schema/simple-schema.js:454:1)
    at meteorInstall.collections.recipes.js (collections/recipes.js:3:16)
    at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
    at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
    at /home/**/Meteor/recipe/.meteor/local/build/programs/server/app/app.js:72:1
    at /home/**/Meteor/recipe/.meteor/local/build/programs/server/boot.js:292:10
    at Array.forEach (native)
    at Function._.each._.forEach (/home/**/.meteor/packages/meteor-tool/.1.4.1_3.1a0sscb++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)

Exited with code: 1
Your application is crashing. Waiting for file change.

这是recipes.js

Recipes = new Mongo.Collection('recipes');
RecipeSchema = new SimpleSchema({
    name: {
        type: String,
        lable: "Name"
    }
});
Recipes.attachSchema( RecipeSchema );

这些是我安装的软件包:

kadira:flow-router
kadira:blaze-layout
erasaur:meteor-lodash
stolinski:stylus-multi
fortawesome:fontawesome
spiderable@1.0.13
fastclick@1.0.12
dburles:collection-helpers
raix:handlebar-helpers
aldeed:collection2
aldeed:autoform
accounts-ui@1.1.9
matb33:bootstrap-glyphicons
msavin:jetsetter
zimme:active-route
gwendall:auth-client-callbacks
accounts-password

0 个答案:

没有答案