These are chat archives for reactioncommerce/reaction

15th
Dec 2017
Josh Cox
@joshuacox
Dec 15 2017 00:39
@zenweasel after messing with meteor's curl oneliner (curl https://install.meteor.com/ | sh) for my own reactionetes, I think we could do the same for reaction
it's all a giant switch off of uname
Josh Cox
@joshuacox
Dec 15 2017 00:44
you can see how I hijacked for my own bootstrap I intended to support mac and windows like they do, but got lost in choco vs cygwin etc.
Brent Hoover
@zenweasel
Dec 15 2017 01:07
their bootstrap doesn’t support Windows
Josh Cox
@joshuacox
Dec 15 2017 01:10

it does too! in verbose DIY mode at least:

if [ "$UNAME" ">" "MINGW" -a "$UNAME" "<" "MINGX" ] ; then
    echo "To install Meteor on Windows, download the installer from:"
    echo "https://install.meteor.com/windows"
    exit 1
fi

at least it says something

Brent Hoover
@zenweasel
Dec 15 2017 01:10
well, they don’t tell you to use it
It tells you to install choco and choco install meteor
Oh lol, that doesn’t count
Josh Cox
@joshuacox
Dec 15 2017 01:11
lol, ya it doesn't
Brent Hoover
@zenweasel
Dec 15 2017 01:11
I mean, if you got that far with Windows…..
Josh Cox
@joshuacox
Dec 15 2017 01:12
lol ya for one, install curl
Brent Hoover
@zenweasel
Dec 15 2017 01:12
I am going to test installing Node via choco some time soon. If that works then you can pretty much do the entire install at the command line in choco
except for of course, installing choco
Josh Cox
@joshuacox
Dec 15 2017 01:13
ya that's the thing that makes supporting windows in a generic shell script impossible, that being said, I think we can still do the same coverage as meteor itself
Brent Hoover
@zenweasel
Dec 15 2017 01:13
so you could just do something like choco install node git imagemagick meteor
then just npm install -g windows-build-tools reaction-cli
and actually installing choco is a one-liner too
Josh Cox
@joshuacox
Dec 15 2017 01:16

its not too far from:

if [ "$UNAME" ">" "MINGW" -a "$UNAME" "<" "MINGX" ] ; then
  check_cmd choco
  check_cmd helm
PLATFORM="os.windows.x86_64"

and add whatever onelines you want

Brent Hoover
@zenweasel
Dec 15 2017 01:16
You can install Xcode from scratch entirely from the command line?
Josh Cox
@joshuacox
Dec 15 2017 01:17
meteor doesn't appear to bother https://install.meteor.com/
Brent Hoover
@zenweasel
Dec 15 2017 01:17
well, they don’t have to because they don’t have binary dependencies
Josh Cox
@joshuacox
Dec 15 2017 01:19
no current mac to test on here at the moment, does something like this work
Brent Hoover
@zenweasel
Dec 15 2017 01:19
but you can’t build bcrypt w/o it I don’t believe
I think you still have to have the app installed for that to work, but I am not sure
other dependencies for reaction like git as well
Josh Cox
@joshuacox
Dec 15 2017 01:23
@pnewell4_twitter you can’t install bcrypt at this point. It’s a known issue with Meteor and the C++ version of bcrypt. Let the app fall back to the javascript implementation
that's a quote from @jshimko on 14th of november if it's not obviouis (it doesn't look quoted right here at least)
Brent Hoover
@zenweasel
Dec 15 2017 01:25
that’s only true on OSX for building Docker images I believe
that’s why we don’t have it installed by default anymore
Josh Cox
@joshuacox
Dec 15 2017 01:26
but isn't that what xcode is for on mac os x? (i.e. building bcrypt)
Brent Hoover
@zenweasel
Dec 15 2017 01:27
Yeah, I don’t know if there are any binary dependencies beyond bcrypt, but I have a memory of reaction complaining if you don’t have Xcode installed. May be old/irrelevant though.
Josh Cox
@joshuacox
Dec 15 2017 01:30
it's certainly worth noting for OS X installs, if it can be automated, it probably should, I'm certain at least ubuntu linux would be easy to support in that same curl oneliner as well
Brent Hoover
@zenweasel
Dec 15 2017 01:31
Yeah, problem is that you have all the different flavors of linux to deal with
the probem is around node mostly
I see people really moving away from using ubuntu for servers
I’m more worried about the more “consumer” desktop platforms like OSX and Windows
Josh Cox
@joshuacox
Dec 15 2017 01:36
I do most of my testing in arch linux and its quite philosphically different than the debian and redhat flavors, and I've been a gentoo user since 2004, and I really find them all to be very much the same with slight opinion choices
you can always put your software in /usr/local/bin
no matter the distro
Brent Hoover
@zenweasel
Dec 15 2017 01:36
I would respectfully disagree
Josh Cox
@joshuacox
Dec 15 2017 01:36
and if it's not already in your path up front, it's easy to put there
Brent Hoover
@zenweasel
Dec 15 2017 01:37
and I would say most of the enterprise level devops people I have worked with would also disagree
Josh Cox
@joshuacox
Dec 15 2017 01:38
I'm certain I overgeneralized a bit, but /usr/local is even that way in os x is it not?
Brent Hoover
@zenweasel
Dec 15 2017 01:40
I would probably be more into a brew package. So just bootstrap brew and then brew install reaction
I think brew has done a pretty good job of working around most of these problems on OSX
and I would say most OSX developers probably have brew installed already
but I would draw the line at trying to create a package for Linux because of all the package systems would be too much work/hassle
Josh Cox
@joshuacox
Dec 15 2017 01:43
exactly, I can't find it, but the brew people themselves confirmed with apple that /usr/local was the official place for them to place their software
Brent Hoover
@zenweasel
Dec 15 2017 01:44
yeah, it’s never the executables that are the problem, it’s the libs
Josh Cox
@joshuacox
Dec 15 2017 01:44
with a local prefix and npm?
i mean noko-giri gives me issues every time with ruby
Brent Hoover
@zenweasel
Dec 15 2017 01:45
not for us really, but it’s the main problem with packaging in general. Which is why I would like to leverage someone who has already solved these problems
Josh Cox
@joshuacox
Dec 15 2017 01:45
like meteor
Brent Hoover
@zenweasel
Dec 15 2017 01:46
not really
Josh Cox
@joshuacox
Dec 15 2017 01:47
what is it that reaction commerce brings to the table above and beyond meteor in this respect?
Brent Hoover
@zenweasel
Dec 15 2017 01:47
well, we have a dependency on git for one
so game over
Josh Cox
@joshuacox
Dec 15 2017 01:49
so error out if the command git is not found and tell the user to install git. that's what I use this function for
Brent Hoover
@zenweasel
Dec 15 2017 01:49
I don’t think just erroring out on x% of installs is an acceptable level of quality
Josh Cox
@joshuacox
Dec 15 2017 01:50
I'll accept that
Brent Hoover
@zenweasel
Dec 15 2017 01:50
does the Meteor installer install Node?
Josh Cox
@joshuacox
Dec 15 2017 01:50
Did you ever get linux on that windows tablet? If so what hardware? I'm always curious how installs go
Brent Hoover
@zenweasel
Dec 15 2017 01:51
I installed Mint on my new Windows laptop and it was a breeze
Josh Cox
@joshuacox
Dec 15 2017 01:51
meteor contains it's own node, so yes
Brent Hoover
@zenweasel
Dec 15 2017 01:51
ah right, but we need a global node
Josh Cox
@joshuacox
Dec 15 2017 01:51
yes, or at least npm?
Brent Hoover
@zenweasel
Dec 15 2017 01:51
Yeah, npm
and then node to run the reaction-cli
Josh Cox
@joshuacox
Dec 15 2017 01:52
I think npm drags in node in most cases though
Brent Hoover
@zenweasel
Dec 15 2017 01:52
or vice-versa
Josh Cox
@joshuacox
Dec 15 2017 01:52
ya it think both ways depending on the package manager
Brent Hoover
@zenweasel
Dec 15 2017 01:52
I wish this was a thread because this is cool but not a topic of wide interest
Josh Cox
@joshuacox
Dec 15 2017 01:53
Start a forum topic I'll reply! Not even sure what the title of this was though?
Brent Hoover
@zenweasel
Dec 15 2017 01:53
“Making installs easier on …"
Josh Cox
@joshuacox
Dec 15 2017 01:53
'lots of install thoughts on various system'
Brent Hoover
@zenweasel
Dec 15 2017 01:53
Lol, yeah
Josh Cox
@joshuacox
Dec 15 2017 01:55
did you see the asciinema I made over coffee this morning? https://asciinema.org/a/152617
there needs to be more of those I think to help people along in the beginning
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema /bin/bash <--- to create your own in xenial 16.04
Brent Hoover
@zenweasel
Dec 15 2017 01:57
Yeah, I might use something like that when I create the Linux video
Josh Cox
@joshuacox
Dec 15 2017 01:57
asciinema rec to start it off
Brent Hoover
@zenweasel
Dec 15 2017 01:57
Windows is something much more requested though
Josh Cox
@joshuacox
Dec 15 2017 01:57
its a fantastic tool
Josh Cox
@joshuacox
Dec 15 2017 02:04
on windows, I remember too, that there is a meteor installer, which is I think the basis of choco package mainly by @abernix
Brent Hoover
@zenweasel
Dec 15 2017 02:07
Yeah, it looks like they abandoned it for two years and just recently restarted work on it
Josh Cox
@joshuacox
Dec 15 2017 02:10
ah because the source of the meteor choco installer is here now
its certainly might be worth looking into, I'm certain you can name git as a dependency in choco packages, I'm headed out to dinner. I hope @childproof found great success in his endeavors
Brent Hoover
@zenweasel
Dec 15 2017 02:14
:+1:
gopeshcitpl
@gopeshcitpl
Dec 15 2017 07:07
hello everyone, i would like to export collection from mongodb and i tried in meteor shell. but i am getting error:
image.png
could you please suggest how i get table data in JSON file.
Loan Laux
@loanlaux
Dec 15 2017 07:32
Does Reaction use any package forked from meteorhacks:kadira?
Screen Shot 2017-12-15 at 08.31.06.png
This DoS vuln looks rather critical as it could potentially disclose customers' emails (and more, but that's the most important)
Brent Hoover
@zenweasel
Dec 15 2017 07:35
@gopeshcitpl that command is meant to be run at the command line, not in a meteor shell
gopeshcitpl
@gopeshcitpl
Dec 15 2017 07:35
what would be the command for export table in meteor shell?
Loan Laux
@loanlaux
Dec 15 2017 07:36
@gopeshcitpl Just use the same command in a Mongo shell
My bad
Brent Hoover
@zenweasel
Dec 15 2017 07:36
I don’t think you can run mongoexport in the mongo shell
that’s a standalone app
Loan Laux
@loanlaux
Dec 15 2017 07:36
If it's mongoexport, use it in your usual shell but make sure you have a full install of MongoDB
Yeah haha, just starting my day here. Vision still a little blurry. 😁
I'll make myself some coffee
@zenweasel Any thought about this DoS vulnerability?
Brent Hoover
@zenweasel
Dec 15 2017 07:58
Yes, we are aware of it. I don’t believe we use any of the packages in question in the version that everyone is using
Loan Laux
@loanlaux
Dec 15 2017 07:58
Perfect!
Brent Hoover
@zenweasel
Dec 15 2017 07:58
we have a couple of those packages in the packages file but they are commented out as they are debugging/profiling packages
so anybody who has enabled kadira will probably be affected and needs to update.
Loan Laux
@loanlaux
Dec 15 2017 07:59
Yes, I saw that too. Not my case so that's cool.
Brent Hoover
@zenweasel
Dec 15 2017 08:02
that’s not an official statement. Just this one dude
Loan Laux
@loanlaux
Dec 15 2017 08:02
Got it
William Moss
@willmoss1000
Dec 15 2017 10:20
@sgobotta i'm getting ' ReferenceError: Collections is not defined'
import { Product } from "/lib/collections/schemas";
import { registerSchema } from "/imports/plugins/core/collections/lib/registerSchema";
import * as Collectinos from "/lib/collections";




// adding to the schema

function extendProductSchema() {
  Logger.info("::: Add location coordinates to simple product schema");
  const ExtendedSchema = new SimpleSchema([Product,
    {
      lat: {
        optional: true,
        type: Number,
        decimal: true
      },
      lng: {
        optional: true,
        type: Number,
        decimal: true
      }
    }
  ]);
  Collections.Products.attachSchema(ExtendedSchema, { replace: true, selector: { type: "simple" } });
  registerSchema("Product", ExtendedSchema);
}

function setProductLocation() {
  Logger.info("::: Set location to product 'Basic Reaction product'");
  Product.update({ title: "Basic Reaction Product" }, {
    $set: {
      lat: 34.0059084,
      lng: -118.4903684
    }
  }, {
    publish: true,
    selector: {
      type: "simple"
    }
  });
}



//  Hook to make additional configuration changes
Hooks.Events.add("afterCoreInit", () => {
  extendProductSchema();
  setProductLocation();

});
any other ideas?
Akarshit Wal
@Akarshit
Dec 15 2017 10:24
import * as Collectinos from "/lib/collections"; Check the spelling :)
Loan Laux
@loanlaux
Dec 15 2017 10:24
Beware of typo on line 3:
import * as Collectinos from "/lib/collections";
Someone was faster!
Akarshit Wal
@Akarshit
Dec 15 2017 10:24
Haha
William Moss
@willmoss1000
Dec 15 2017 10:24
oh god
apologies
thanks!
Akarshit Wal
@Akarshit
Dec 15 2017 10:25
@willmoss1000 It's always a good idea to use a linter to avoid problem like these.
Loan Laux
@loanlaux
Dec 15 2017 10:27
I just created the first Reaction Commerce user group in Paris, France: https://www.meetup.com/Reaction-Commerce-in-Paris/. Aiming at doing the first Meetup in January with a demo of the interface/main features, live coding plugin demo and a networking slot at the end. If anyone in Paris wants to attend, you're welcome to sign up!
William Moss
@willmoss1000
Dec 15 2017 10:49
back to the original error: 'ReferenceError: Products is not defined'
@sgobotta @Akarshit ?
Michael Jenny
@prinzdezibel
Dec 15 2017 10:56
@loanlaux :thumbsup: Would like to see you, but I'm afraid Paris is a bit too far from me (650km)
Loan Laux
@loanlaux
Dec 15 2017 10:57
@prinzdezibel Let me know if you visit one day ;)
William Moss
@willmoss1000
Dec 15 2017 11:05
all good now cheers!
Akarshit Wal
@Akarshit
Dec 15 2017 11:05
@willmoss1000 What was the problem?
Because it was working for me.
William Moss
@willmoss1000
Dec 15 2017 11:07
I didn't replace all instances of Products with collections.Products ... @Akarshit
thanks for your help!
Marcelo Rubini
@marcelorubini
Dec 15 2017 13:47
@prinzdezibel regarding to reaction-shippo plugin, there is also a bug evaluating width, length and height from reactionParcel argument, when shippoParcel object is created. If there is no value or "0" for the Product parcel property, sets an empty string and Shippo API does not accept strings as dimension values, numbers are expected. And the minimun value for Shippo API is 0.0001.
REF: imports/plugins/included/shipping-shippo/server/methods/shippo.js LINES: 37:36 - 38:38 - 39:38
Michael Jenny
@prinzdezibel
Dec 15 2017 13:51
@marcelorubini Would you mind to file an issue in GitHub tracker that explains how to reproduce it?
nurub52
@nurub52
Dec 15 2017 14:06
Did any one tried to build fresh docker custom image since last 2 days I have been getting below for last 2 days
Downloading Meteor distribution
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Retrying download in 5 seconds...
Michael Jenny
@prinzdezibel
Dec 15 2017 14:23
@marcelorubini If you don't mind, that is. Otherwise I can do also. Just want to make sure the issue is accurate.
@nurub52 are you behind a company proxy ?
nurub52
@nurub52
Dec 15 2017 14:24
No
When I do curl to install.sh I am able to get it
Marcelo Rubini
@marcelorubini
Dec 15 2017 15:35
@prinzdezibel No problem, will file the issue in github
Loz
@lozGemachet_twitter
Dec 15 2017 16:05

@zenweasel

where do you have the plugin in your project?
its in custom/my-plugin/register.js

rhaix
@rhaix
Dec 15 2017 17:10
hey, quick one, how can I get rid of the "Sold Out" Badge? This store will not have inventory of any items, but when I make the inventory 0, and allow backorder, the badge won't go away.
rhaix
@rhaix
Dec 15 2017 18:59
@kieckhafer Interesting, so no way to do it with the configs, just replace the sold out component with something else, wouldn't that break any functionality or have any adverse effects with checkout or something, because even if I change the component it still registers as "Sold Out" no?