Hi. I'm trying to implement this solution proposed...
# pact-js
m
Hi. I'm trying to implement this solution proposed in https://stackoverflow.com/questions/68455650/cannot-make-cypress-and-pact-work-together/68492932#68492932 using pact 11.0.0 and cypress 12.7.0. But Cypress throws this error when I try to import the Matchers. Any idea how to solve this? Thanks
Copy code
Error: Webpack Compilation Error
./node_modules/@pact-foundation/pact-core/src/service.js 132:29
Module parse failed: Unexpected token (132:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
|                 if (match && match[1]) {
|                     this.options.port = parseInt(match[1], 10);
>                     if (this?.__instance?.stdout) {
|                         this.__instance.stdout.removeListener('data', catchPort);
|                     }
t
I think you’d have to use pact 9.x , as that example uses pact-web
(which isn’t compatible with pact after 10.x)
m
So should I install pact-web or just pact 9.x?
t
You’ll need pact-web @ 9.x I think. Apologies, I forgot that pact-web contained Pact directly
I thought it was a peer dependency, but actually I don’t think it will work together
you could try asking the pactflow team if they’re still using pact + cypress after pact-web was deprecated
m
Thanks for the information.