TypeError: Object [object Object] has no method 'validate’
at SeedDB.loadBaseData (imports/startup/server/seed.js:19:26)
Exited with code: 8
Your application is crashing. Waiting for file change.
I’m still trying to get comfortable with ES6 modules, and would like to verify my understanding of why these two imports are necessary. I know the first import loads the file for side-effects only, and does not import any symbols, so the second import would be required to make UsersExtraSchema available in this file.
What is not clear to me is why the first import is required in addition to the second import. Doesn’t the second import have to load the entire contents of schemas.js in order to define UsersExtraSchema, rendering the first import unnecessary?
A little googling uncovered the fact that module loading semantics is underspecified in ES6, in particular so that systems like WebPack can reduce the size of modules to be sent over the wire. So I’m hypothesizing that the second import does not guarantee that the entire schemas.js file will be loaded, rendering the first one necessary.
Or is there some Meteor-specific issue going on here? Could someone clear this up for me, please?