Greetings! Apologies if this is the incorrect plac...
# pact-js
v
Greetings! Apologies if this is the incorrect place to post this question. I am using
jest-pact@0.10.1
and
@pact_foundation/pact@9.18.1
using the
new Publisher
pattern for publishing the pact to pact flow. I am getting this error:
Copy code
`consumer_name': undefined method `[]' for nil:NilClass (NoMethodError)
My pact does indeed have the consumer name in the pact.json
Copy code
"consumer": {
    "name": "<MyConsumer>"
  },
  "provider": {
    "name": "<MyProvider>"
  },
I was hoping someone else might have ran into this issue? I haven’t been able to publish my pact 🙁
m
Can you please share the code you’re using to publish it?
(and this is the right place 🙂 )
v
thank you Matt for your response. here is my
publish.js
file I’m using to hit via node script in the package.json
I just got my pact to publish via npm script in package.json mentioned here: https://github.com/pact-foundation/pact-js/tree/9.x.x
m
Right, the
Publisher
interface is definitely deprecated in the latest version
Using the CLI (which is presumably what you mean via
npm script
is the recommended way)
v
yes exactly Thank you for clarifying
👍 1