決定創建一個新項目並開始新鮮,然後簽出一個單獨的項目(處於工作狀態)的代碼後,我得到以下錯誤,簡單-schema。這種模式正在發揮作用,因此可能在某些方面更新已經打破了它。流星0.9.1:ReferenceError:SimpleSchema沒有定義
任何人都可以提出我需要做什麼來排序呢?
端子輸出:
$ meteor
[[[[[ ~/puzzle ]]]]]
=> Started proxy.
=> Started MongoDB.
W20140906-10:30:37.252(-7)? (STDERR)
W20140906-10:30:37.339(-7)? (STDERR) /home/me/.meteor/packages/meteor-tool/.1.0.27.11fuo6h++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20140906-10:30:37.339(-7)? (STDERR) throw(ex);
W20140906-10:30:37.340(-7)? (STDERR) ^
W20140906-10:30:37.340(-7)? (STDERR) ReferenceError: SimpleSchema is not defined
W20140906-10:30:37.341(-7)? (STDERR) at app/lib/schema-Account-Type.js:5:26
W20140906-10:30:37.341(-7)? (STDERR) at app/lib/schema-Account-Type.js:25:3
W20140906-10:30:37.341(-7)? (STDERR) at /home/me/puzzle/.meteor/local/build/programs/server/boot.js:161:10
W20140906-10:30:37.342(-7)? (STDERR) at Array.forEach (native)
W20140906-10:30:37.342(-7)? (STDERR) at Function._.each._.forEach (/home/graeme/.meteor/packages/meteor-tool/.1.0.27.11fuo6h++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20140906-10:30:37.342(-7)? (STDERR) at /home/me/puzzle/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
模式:
AccountType = new Meteor.Collection("AccountType");
Schema = {};
Schema.AccountType = new SimpleSchema({
accountType: {
type: String,
allowedValues: ['test', 'live']
},
createdBy: {
type: String,
autoValue: function(){ return this.userId }
}
});
SimpleSchema.debug = true;
AccountType.attachSchema(Schema.AccountType);
添加這些軟件包到流星應用程序也幫助: 「 #爲此項目添加... kadira:流量路由器 kadira:閃耀佈局 erasaur:流星lodash stolinski:手寫筆,多 fortawesome:fontawesome spiderable fastclick raix:車把助手 aldeed:collection2 aldeed:自動窗體 賬戶的UI 賬戶密碼 matb33 :bootstrap-glyphicons msavin:jetsetter zimme:active-route gwendall:auth-client-callbacks aldeed:simple-schema 「 – theebz 2018-02-21 04:27:02