Hi all, i am trying to setup <https://github.com/p...
# pact-js
j
Hi all, i am trying to setup https://github.com/pactflow/example-consumer to run tests as per

https://www.youtube.com/watch?v=6Qd-kq1AzZI&amp;ab_channel=Pactflow

. i am getting an error, Failed prop type: Invalid prop
children
of type
array
supplied to
Layout
, expected a single ReactElement type
m
Remove node modules and then Run
npm ci
(not
npm i
).
I think it's because a dependency isn't pinned and a minor version update breaks things
Oh actually I'm mixing that problem up with the JS workshop. I think it's the same problem though
Mind raising an issue on GH please?
Are you able to replicate this issue
m
I haven't looked, it's the weekend here 😎
j
I am also in your same city 😁
😆 1
Provider is actually running
I don't know why did you closed the ticket
m
hmm, strange. I can see the bug report is
<http://localhost:3000/error>
. Can you please show the network tab or capture a full HAR from the chrome dev tools when you navigate to
/
?
j
Why are you closing it mate
You asked me to raise a GitHub issue ,then you should ask me there
Anyone can close a ticket
m
Sorry, we can of course re-open. I am looking for a way to reproduce the error
j
Please reopen
m
I have re-opened. Apologies, I wasn’t trying to be rude! If you could please provide a little more information that will be helpful in getting to the bottom of it
FYI - you don’t actually need to run
npm start
to do the contract tests. It’s more just so you can see the application running. You probably know that, but it’s not clear in the readme that’s the case
j
har for issue
👍 1
m
OK, I can see the problem - it’s trying to send requests to
localhost:3001
The example is actually part of this workshop, and one of the steps describes how to configure it to point at the provider: https://docs.pactflow.io/docs/workshops/ci-cd/set-up-local-development/run-the-applications
you can see your api is starting on 8080
I’ll update the docs
y
I think for consistency it might be good to have the consumer as 3000 and provider as 3001 across all the examples.
👍 1
I corrected in the BDC examples consumer/providers. Happy to jump on this, and I have wanted to pin those deps and update the deps across the pact workshop for ages now, as it causes me a bit of a headache every time I spin it up after a hiatus
👍 1
j
it works now, thanks
👍 1