0
我試圖用進口以訪問的對象,但我與邏輯掙扎:流星進口不工作
schemas.js:
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export default UsersExtraSchema = new SimpleSchema({
...
}
seed.js:
import '/imports/startup/server/schemas.js';
export default class SeedDB {
loadBaseData() {
....
UsersExtraSchema.validate(attr);
...
}
}
我收到錯誤:
TypeError: Object [object Object] has no method 'validate'
at SeedDB.loadBaseData (imports/startup/server/seed.js:19:26)
at server/main.js:11:14
at /tidee/app/tidee-meteor/.meteor/local/build/programs/server/boot.js:290:5
Exited with code: 8
Your application is crashing. Waiting for file change.
與以前一樣的錯誤。 – JoeTidee