These are chat archives for reactioncommerce/reaction

12th
Apr 2018
Michael Duane Mooring
@mikeumus
Apr 12 2018 03:58
Hey Gang, since rc1.9, what're we supposed to do for deleted templates like variantList using things like: Template.variantList.onRendered() :question:
KunalDE
@KunalDE
Apr 12 2018 08:02
When we add the new product and couldn't edit the price if we can't insert any variant.
Loan Laux
@loanlaux
Apr 12 2018 08:07
Sorry @KunalDE, but given the extremely old version of Reaction you're using, I doubt anyone here will be able to help you out on bugs that have most likely been fixed a long time ago.
I really think you should catch up and update to Reaction 1.10, even though that certainly means rewriting most of your code. You're not getting a good experience of Reaction at all—it's a small price to pay to make it a whole lot better (and get support more easily!)
Brent Hoover
@zenweasel
Apr 12 2018 08:10
Agreed. Version 0.17 is a very different product although it may look similar
Literally hundreds of bugs have been fixed since then
Loan Laux
@loanlaux
Apr 12 2018 08:12
To be honest I really don't understand how you ended up working on this antique version, @KunalDE
Brent Hoover
@zenweasel
Apr 12 2018 08:12
My guess was that it was packaged in a distro somewhere? That would explain both the old version and the lack of .git
Loan Laux
@loanlaux
Apr 12 2018 08:12
Probably, yeah
But updating to a modern Reaction is definitely doable with patience and knowledge of the main API changes that have been introduced during the past two years
Brent Hoover
@zenweasel
Apr 12 2018 08:13
If you haven’t changed core code, it’s very doable
KunalDE
@KunalDE
Apr 12 2018 08:16
@Loan Laux we are not working on old version of reaction Ok Mr. Loan. And in old version it's edit the price. But in current version i.e. 1.10.0 it's not update the price.
Loan Laux
@loanlaux
Apr 12 2018 08:18
Well, 0.17 was released more than two years ago so I would consider that quite old. Are you saying you updated to 1.10?
KunalDE
@KunalDE
Apr 12 2018 08:18
@Loan Laux, yes.
And in that version we can't edit the price.
Loan Laux
@loanlaux
Apr 12 2018 08:19
Oh, nice! Glad to hear you've been able to do it in just two days. :+1:
Could you please post screenshots or reproduction steps describing the issue?
KunalDE
@KunalDE
Apr 12 2018 08:21
ya sure. The steps are given below.
Srikanth K
@srikanthkolli
Apr 12 2018 08:21
Error: "settings.cart.cleanupDurationDays" is in the schema but "settings.cart" is not
getting this error. any idea how can i resolve this error?
Brent Hoover
@zenweasel
Apr 12 2018 08:22
@srikanthkolli Have you made changes to the schemas? Not seeing that issue in stock Reaction
KunalDE
@KunalDE
Apr 12 2018 08:25
@Loan Laux , Step 1: First we click o the Add Products button.
Step2: We edit the Title and Sub-Title.
Step3: When we clicked on Price edit button then on right hand side we can't find any edit option for price.
Brent Hoover
@zenweasel
Apr 12 2018 08:25
You can’t edit price for a product like that. It’s determined from the prices of the options and variants
KunalDE
@KunalDE
Apr 12 2018 08:26
@Zenweasel, but if we didn't want to insert any variants.
Srikanth K
@srikanthkolli
Apr 12 2018 08:27
@zenweasel yes, we have amended some new nodes to product schema. But it is working fine upto day ago. this is complete error logs i can see in docker
Error: "settings.cart.cleanupDurationDays" is in the schema but "settings.cart" is not at /app/programs/server/npm/node_modules/simpl-schema/dist/SimpleSchema.js:610:70 at Array.forEach (<anonymous>) at SimpleSchema.extend (/app/programs/server/npm/node_modules/simpl-schema/dist/SimpleSchema.js:606:24) at registry.js (lib/collections/schemas/registry.js:254:56) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at analytics.js (lib/collections/schemas/analytics.js:1:743) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at index.js (lib/collections/schemas/index.js:1:145) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at collections.js (lib/collections/collections.js:1:732) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at index.js (lib/collections/index.js:1:14) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at catalog.js (lib/api/catalog.js:1:163) at fileEvaluate (packages/modules-runtime.js:343:9) at require (packages/modules-runtime.js:238:16) at index.js (lib/api/index.js:1:90)
Brent Hoover
@zenweasel
Apr 12 2018 08:27
@kunalDE You have to have at least one variant
KunalDE
@KunalDE
Apr 12 2018 08:27
@Zenweasel , ok.
Brent Hoover
@zenweasel
Apr 12 2018 08:28
When type: simple that product is basically just a container for marketing information. It’s the option/variant that the customer actually buys
So for example here we have a “one size” option: https://swag.getreaction.io/product/reaction-mug
@srikanthkolli I don’t know why this wouldn’t be broken for everybody but try adding this entry to lib/collections/schemas/registry.js for the CorePackageConfig schema:
  "settings.cart": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
Srikanth K
@srikanthkolli
Apr 12 2018 08:34
okay i will try that. thankyou
Nikolay Tsenkov
@nicroto
Apr 12 2018 08:49

@zenweasel I am trying to run reaction, but I've hit a couple of issues.

First one was with meteor build running out of memory, which I am not sure I solved since now the build still crashes, but differently (so I guess that's likely a YES, it was solved and this is a new issue).

The current error is:

tsenkov$ TOOL_NODE_FLAGS="--max-old-space-size=2048" reaction
Setting up plugin imports...

Installing dependencies for connectors-shopify...

up to date in 0.083s
Setting up style imports...

Provisioning assets...

[[[[[ ~/build/reaction ]]]]]

=> Started proxy.

Unable to resolve some modules:

  "@babel/runtime/helpers/objectSpread" in /Users/tsenkov/build/reaction/imports/plugins/core/collections/lib/validation.js
(web.browser)

...

Unable to resolve some modules:

  "@babel/runtime/helpers/builtin/objectSpread" in
/Users/tsenkov/build/reaction/imports/plugins/core/collections/lib/validation.js (os.osx.x86_64)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save @babel/runtime

/Users/tsenkov/build/reaction/.meteor/local/build/programs/server/boot.js:475
}).run();
   ^

Error: Cannot find module '@babel/runtime/helpers/builtin/objectSpread'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.require (/Users/tsenkov/build/reaction/.meteor/local/build/programs/server/boot.js:288:32)
    at makeInstallerOptions.fallback (packages/modules-runtime.js:651:18)
    at require (packages/modules-runtime.js:244:16)
    at generator.js (/Users/tsenkov/build/reaction/.meteor/local/build/programs/server/packages/boilerplate-generator.js:26:45)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at /Users/tsenkov/build/reaction/.meteor/local/build/programs/server/packages/boilerplate-generator.js:388:15
    at /Users/tsenkov/build/reaction/.meteor/local/build/programs/server/packages/boilerplate-generator.js:395:3
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
Brent Hoover
@zenweasel
Apr 12 2018 08:50
@nicroto Can you do reaction reset -y? That will reset your database and remove and reinstall all your node modules
Nikolay Tsenkov
@nicroto
Apr 12 2018 08:50
I have.
No change.
I tried meteor npm install --save @babel/runtime, too.
Also no change.
Brent Hoover
@zenweasel
Apr 12 2018 08:51
Ok, can you do it manually and see if you see any errors when installing? e.g. rm -rf node_modules && meteor npm install
Nikolay Tsenkov
@nicroto
Apr 12 2018 08:51
Checking...
Brent Hoover
@zenweasel
Apr 12 2018 08:52
And what you do see from reaction -v?
Nikolay Tsenkov
@nicroto
Apr 12 2018 08:53
Yeah I was about to post that:
tsenkov$ reaction -v

Node: 9.11.1
NPM: 5.6.0
Meteor Node: 8.11.1
Meteor NPM: 5.6.0
Reaction CLI: 0.29.0
Docker: 18.03.0-ce
meteor npm install just finished (I did remove the node_modules before that).
now just reaction?
Brent Hoover
@zenweasel
Apr 12 2018 08:55
Yes
Nikolay Tsenkov
@nicroto
Apr 12 2018 08:55
(well I will still have to run it like this TOOL_NODE_FLAGS="--max-old-space-size=2048" reaction)
ok
Running...
I am still seeing that this module @babel/runtime/helpers/objectSpread although the built isn't finished yet.
It says it's required by reaction/imports/plugins/core/collections/lib/validation.js
yep, same result
Brent Hoover
@zenweasel
Apr 12 2018 08:59
What version of Reaction are you running?
I don’t see it listed in your reaction -v which is odd
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:00
well I used the documentation to set it up yesterday
Let me check for a version in the dir
Brent Hoover
@zenweasel
Apr 12 2018 09:01
It’s in package.json but if it’s not in reaction -v something is probably messed up
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:01
yeah
1.10.0
Brent Hoover
@zenweasel
Apr 12 2018 09:01
Have you made any changes to package.json?
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:01
nope
No changes
Oh I had to run it in the dir
reaction -v
that is
Brent Hoover
@zenweasel
Apr 12 2018 09:02
Yeah
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:02
tsenkov$ reaction -v

Node: 9.11.1
NPM: 5.6.0
Meteor Node: 8.11.1
Meteor NPM: 5.6.0
Reaction CLI: 0.29.0
Reaction: 1.10.0
Reaction branch: master
Docker: 18.03.0-ce
I am on latest Node, could that be the issue?
Brent Hoover
@zenweasel
Apr 12 2018 09:03
I was just going to mention that but Meteor should be using it’s own Node
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:03
And its own npm...
Brent Hoover
@zenweasel
Apr 12 2018 09:04
Correct
Although, could still be a problem not sure
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:04
I can easily switch to another node version
Brent Hoover
@zenweasel
Apr 12 2018 09:04
worth a shot then?
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:04
(I think I need to reinstall reaction-cli, though?)
what version do you want me to try?
Brent Hoover
@zenweasel
Apr 12 2018 09:05
yeah, possibly since it’s install global
Loan Laux
@loanlaux
Apr 12 2018 09:05
Try 8.9.4 @nicroto
Brent Hoover
@zenweasel
Apr 12 2018 09:05
I am running 8.9.4 here. So I guess that’s as good as any
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:05
ok
(this will take some time - will report back, thanks for the help so far)
Brent Hoover
@zenweasel
Apr 12 2018 09:08
Ok, I may need to go pay attention to my family soon so I might not be around
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:10
:thumbsup:
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:18
Yep, with this Node version it worked.
Brent Hoover
@zenweasel
Apr 12 2018 09:18
Awesome
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:18
Will create a github issue so it is known problem.
Thanks again for the help.
Loan Laux
@loanlaux
Apr 12 2018 09:19
:clap:
Brent Hoover
@zenweasel
Apr 12 2018 09:19
Probably wouldn’t be good for a GH issue on Reaction
Since it’s not really actionable by us
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:19
Hm...
Well having latest version of everything results in inability to run Reaction... Maybe the docs should make a note on this?
Brent Hoover
@zenweasel
Apr 12 2018 09:22
Yeah, that’s a good call. You could create an issue/PR on the reaction-docs repo
Nikolay Tsenkov
@nicroto
Apr 12 2018 09:22
I am not sure where is the problem... sometimes fixes in node would reveal an issue in a project that was previously working exploiting a certain issue, so it looks like node is to blame but is actually the project. And in this case I am not sure if it would be a Reaction problem or Meteor problem either...
OK will submit an issue on the reaction-docs repo.
Brent Hoover
@zenweasel
Apr 12 2018 09:24
Yeah, we probably wouldn’t really start looking into it until it was an issue in LTS. There’s nothing really Reaction-specific there in just installing NPM package. Possibly in an upstream issue in babel
William Moss
@willmoss1000
Apr 12 2018 09:51
@srikanthkolli just to confirm, did adding settings.cart to the schema fix the issue?
Srikanth K
@srikanthkolli
Apr 12 2018 10:49
@zenweasel @willmoss1000 settings.cart error was gone, but got new one Error: "settings.public.segmentio.enabled" is in the schema but "settings.public.segmentio" is not
William Moss
@willmoss1000
Apr 12 2018 11:22
@srikanthkolli same - just got that. Looks like there will be a fair few of these. Would be good to reproduce locally such that we can fix them faster
Srikanth K
@srikanthkolli
Apr 12 2018 11:24
i have take docker build to find these issue. is there any other way ?
William Moss
@willmoss1000
Apr 12 2018 11:27
That's what I'm doing. I'm not sure why these aren't being picked up locally? The pattern is pretty obvious at least. Would be great if you could keep me up to date if you find any more :+1: Has a github issue been filed?
Had a quick look through. I don't expect there will be any more after this one
William Moss
@willmoss1000
Apr 12 2018 11:32
  "settings.public.segmentio": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
  "settings.public.googleAnalytics": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
  "settings.public.mixpanel": {
    type: Object,
    optional: true,
    defaultValue: {}
  }
Srikanth K
@srikanthkolli
Apr 12 2018 11:35
sure. i didn't file the issue.
William Moss
@willmoss1000
Apr 12 2018 11:38
Ok, lets see if this works. If so I can put in an issue and follow it up with a pull request if the core team haven't already
William Moss
@willmoss1000
Apr 12 2018 12:13
@srikanthkolli I missed settings.public add that below too
William Moss
@willmoss1000
Apr 12 2018 12:34
@srikanthkolli @zenweasel I posted an issue for this here reactioncommerce/reaction#4173 . Will follow it up with a pull request once I find all the issues.
Srikanth K
@srikanthkolli
Apr 12 2018 12:36
@willmoss1000 where did you add the above lines registry.js or analytics.js?
William Moss
@willmoss1000
Apr 12 2018 12:40
into analytics.js. But be sure to add settings.public too
I will let you know if it works when my pipeline runs
William Moss
@willmoss1000
Apr 12 2018 12:47
works for me
Srikanth K
@srikanthkolli
Apr 12 2018 12:49
👏 my build is in progress. need to see
Daniel Honig
@dhonig
Apr 12 2018 13:55
Finding a strange problem when deploying via docker-compose : https://gist.github.com/dhonig/e30f29e84be4ab294c51b635b6850083
Loan Laux
@loanlaux
Apr 12 2018 14:59
@zenweasel @srikanthkolli Just got that same Error: "settings.cart.cleanupDurationDays" is in the schema but "settings.cart" is on a Docker-deployed Reaction
Daniel Honig
@dhonig
Apr 12 2018 15:00
The docker setup uses the tag :latest
so thats one way that new bugs can creep in
Loan Laux
@loanlaux
Apr 12 2018 15:00
@dhonig and I are working together, to clarify
Any idea, anyone?
William Moss
@willmoss1000
Apr 12 2018 15:03
yep @loanlaux fixed for me: reactioncommerce/reaction#4173
also need to add this to analytics.js as this is the next error:
  "settings.public.segmentio": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
  "settings.public.googleAnalytics": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
  "settings.public.mixpanel": {
    type: Object,
    optional: true,
    defaultValue: {}
  },
  "settings.public": {
    type: Object,
    optional: true,
    defaultValue: {}
  }
Haven't written a pull request yet though
Loan Laux
@loanlaux
Apr 12 2018 15:05
Awesome, thank you @willmoss1000!
But I'm curious as to why did that issue pop out of nowhere since we were already running 1.10 on Docker for weeks
Why would that code be missing as it's necessary to start up Reaction? Did someone in the code team mess up a git merge? 😜
William Moss
@willmoss1000
Apr 12 2018 15:09
Yep, that was what confused me
Kamil Kozieradzki
@Kacoze
Apr 12 2018 17:29
Hey guys! I have one question for you :)
I'm looking into Reactioncommerce for some time, and I would love to use it in production.
Should I use the newest version? Or maybe there is some LTS?
Daniel Honig
@dhonig
Apr 12 2018 17:30
@Kacoze definetly stay up to date during your build
this code base has been moving very fast.
Kamil Kozieradzki
@Kacoze
Apr 12 2018 17:38
Thanks :)
Michael Duane Mooring
@mikeumus
Apr 12 2018 19:30
Hey Gang, since rc1.9, what're we supposed to do for deleted templates like variantList using things like: Template.variantList.onRendered() :question:
Daniel Honig
@dhonig
Apr 12 2018 19:30
There should be react components that replace most things
Michael Duane Mooring
@mikeumus
Apr 12 2018 19:31
yeah
I'm looking around. I guess I'm asking what replaced variantList ?
so then is there a equivalent hook for Template.variantList.onRendered() for the new variantList react component?
Michael Duane Mooring
@mikeumus
Apr 12 2018 19:50
or would we have to import the methods we need to execute into the variantList's render() function?

oh maybe componentDidMount()
https://stackoverflow.com/a/35262142/1762493

Okay I'll stop the monologue ;)

Brent Hoover
@zenweasel
Apr 12 2018 21:00
@willmoss1000 that analytics.js should have just been removed. I don’t think it’s used any more
Loan Laux
@loanlaux
Apr 12 2018 21:49
This missing schema field issue just keeps on going. After applying @willmoss1000's fix, I'm getting Uncaught Error: "settings.shops.enabledShopTypes" is in the schema but "settings.shops" is not in the client console with a blank page... @willmoss1000 did you experience the same thing?
Just to be clear, Reaction starts up fine now
Brent Hoover
@zenweasel
Apr 12 2018 21:50
Why is this popping up all the sudden?
We have people who are running live production sites w/o this issue
Loan Laux
@loanlaux
Apr 12 2018 21:51
No idea, but three people here started experiencing the same thing today out of nowhere
The common factor seems to be Docker
Brent Hoover
@zenweasel
Apr 12 2018 21:52
I am running a live site which is hosted in Docker. Not seeing the issue
Loan Laux
@loanlaux
Apr 12 2018 21:52
But have you rebuilt the container today?
Brent Hoover
@zenweasel
Apr 12 2018 21:53
Not in the last 2 hours, but yesterday
Loan Laux
@loanlaux
Apr 12 2018 21:53
I'm thinking there might be an issue with the image on Dockerhub, which was updated today
Try rebuilding the container and see if you get the same
Brent Hoover
@zenweasel
Apr 12 2018 21:54
kk
Loan Laux
@loanlaux
Apr 12 2018 21:55
Now, this really is edging towards the limit of my understanding so I'm not sure I'll be able to provide additional insight
But I'd be glad to help as much as I can!