Astronomy : TypeError, Cannot read property 'prototype' of undefined

Hello community, I'm asking for help here because I've been stuck on this problem for several days. I'm using the Astronomy package and after defining a new class, as I usually do, I get this error when launching meteor. I tried to delete my new classes, to reset the Mongo data, and even to reinstall Meteor but nothing works. So I turn to you in a last hope 🥹 I also put here the classes that "seem" to cause problems
No description
1 Reply
Vikron
VikronOP•2y ago
Order.js
export const Orders = new Mongo.Collection('orders');

const Order = Class.create({
name: 'Order',
collection: Orders,
typeField: '_type',
secured: false,
fields: {
menu : Menu,
status : {
type : OrderStatus,
default : function(){
return 0;
}
},
payed : Boolean,
createdAt: Date,
}
});

export default Order;
export const Orders = new Mongo.Collection('orders');

const Order = Class.create({
name: 'Order',
collection: Orders,
typeField: '_type',
secured: false,
fields: {
menu : Menu,
status : {
type : OrderStatus,
default : function(){
return 0;
}
},
payed : Boolean,
createdAt: Date,
}
});

export default Order;
Menu.js
export const Menus = new Mongo.Collection('menus');

const Menu = Class.create({
name: 'Menu',
collection: Menus,
typeField: '_type',
secured: false,
fields: {
title: {
type: String,
},
price : Number,
createdAt: Date,
},
meteorMethods: {

}
});

export default Menu;
export const Menus = new Mongo.Collection('menus');

const Menu = Class.create({
name: 'Menu',
collection: Menus,
typeField: '_type',
secured: false,
fields: {
title: {
type: String,
},
price : Number,
createdAt: Date,
},
meteorMethods: {

}
});

export default Menu;
OrderStatus
const OrderStatus = Enum.create({
name: 'OrderStatus',
identifiers: ['PENDING', 'PREPARED', 'DELIVERED']
});

export default OrderStatus;
const OrderStatus = Enum.create({
name: 'OrderStatus',
identifiers: ['PENDING', 'PREPARED', 'DELIVERED']
});

export default OrderStatus;
Thanks in advance for the help 🥲
Want results from more Discord servers?
Add your server