Open mgcrea opened 8 years ago
I have a specific need of supporting schema (camo's Document) definitions accross modules:
With a basic schema:
import {Document} from 'camo'; export default class User extends Document { constructor() { super(); this.name = String; this.breed = String; } }
Required from another module:
const uri = 'mongodb://127.0.0.1:27017/core'; log.info('Connecting to database uri="%s"...', uri); connect(uri).then(db => { log.info('Connected to database uri="%s"', uri); return; }) .then(() => { log.debug('creating...'); const lassie = User.create({ name: 'Lassie' }); log.debug('saving...', lassie); return lassie.save().then((l) => { log.debug(l.id); }); }) .then(() => { return User.loadOne({name: 'Lassie'}).then((l) => { log.debug('Got Lassie!'); log.debug('Her unique ID is', l.id); }); });
With latest version, this currently hangs on User.create.
User.create
More specifically, it looks like that it is this line that do hang:
super();
Which is compiled by babel 6 to something like:
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(User).call(this));
Any idea where this could come from or where should I look into?
I have a specific need of supporting schema (camo's Document) definitions accross modules:
With a basic schema:
Required from another module:
With latest version, this currently hangs on
User.create
.More specifically, it looks like that it is this line that do hang:
Which is compiled by babel 6 to something like:
Any idea where this could come from or where should I look into?