These are chat archives for reactioncommerce/reaction

1st
Mar 2017
Victor Klyuev
@edealau_twitter
Mar 01 2017 01:58

I'm trying to extend the layout schema in a plugin... I have layouts.js in imports/plugins/custom/test-plugin/lib/collections/schemas:

import { SimpleSchema } from "meteor/aldeed:simple-schema";
import { LayoutStructure } from "/lib/collections/schemas/layouts";

export const zoneLayoutStructure = new SimpleSchema({
    layoutZoneCategories: {
        type: String,
        optional: true,
        index: true
    },
    layoutZoneBestsellers: {
        type: String,
        optional: true,
        index: true
    }
});

LayoutStructure.attachSchema(zoneLayoutStructure);

index.js:

export * from "./layouts";

What am I missing?

Victor Klyuev
@edealau_twitter
Mar 01 2017 02:14
adding the properties directly to the LayoutStructure in /lib/collections/schemas/layouts.js does work, however, trying to extend it with the above doesn't...
Michael Duane Mooring
@mikeumus
Mar 01 2017 03:13

@amp9020, of course. I'm using Products.interset() in my app, see an example of it here:

And then there's Meteor methods here to do it as well Meteor.call('products/createProduct'):

Aaron Judd
@aaronjudd
Mar 01 2017 03:52
@edealau_twitter that sounds like if you are importing LayoutStructure and using directly, it would apply, and if you exported and imported elsewhere it would apply, but you’d need to attach to Reaction.Schemas (I think) to use globally (that’s a little questionable I think, but should work).
Michael Duane Mooring
@mikeumus
Mar 01 2017 03:53

Is it possible to get better error messages with source maps than this?

Uncaught TypeError: Cannot read property 'price' of undefined    app.js:56023 
    at http://104.196.230.31:3000/app/app.js?hash=20c8ad4b10063c8115b20ebdc28f0bd1182669d5:56023:70

I'm running with just rc run, I'll try rc debug

Victor Klyuev
@edealau_twitter
Mar 01 2017 03:58
@aaronjudd
Aaron Judd
@aaronjudd
Mar 01 2017 03:59
@mikeumus usually the console provides enough detail, when you click into the source in dev. I’ve seen a few cases where it’s not (like this one, maybe). there’s also a few issues on meteor about this, most notably: meteor/meteor#4384
Michael Duane Mooring
@mikeumus
Mar 01 2017 04:34
k cool, thanks @aaronjudd :)
Victor Klyuev
@edealau_twitter
Mar 01 2017 05:43
@aaronjudd
Thank you Aaron... how to attach it to the Reaction.Schemas to use globally?
Arturo
@paperbaker
Mar 01 2017 18:47
Hey everyone. I'm looking at deploying onto Lightsail. Anybody advise going for a stack or OS?
what i mean is do you guys install everything from scratch usually?
Spencer Norman
@spencern
Mar 01 2017 18:49
Docker is the recommended way to deploy Reaction and what we use for our shop
Arturo
@paperbaker
Mar 01 2017 18:50
Ah, right, got it.
That's perfect, and if anybody is in NY I just found an awesome AWS conference that teaches how to deploy docker containers that's free I believe https://www.eiseverywhere.com/ereg/index.php?eventid=233226