I think I'm now getting a depenedency error, is an...
# pact-js
j
I think I'm now getting a depenedency error, is anyone familiar with duplex or pretty-pino? I tried deleting node modules and yarn,.lock, then running yarn upgrade and yarn install again but i'm still getting this error
Copy code
at node_modules/@pact-foundation/src/dsl/verifier/verifier.ts:137:29
/test/node_modules/pino-pretty/node_modules/readable-stream/lib/internal/streams/readable.js:207
  const isDuplex = this instanceof require('./duplex')
                        ^
TypeError: Right-hand side of 'instanceof' is not callable
    at Transform.Readable (/test/node_modules/pino-pretty/node_modules/readable-stream/lib/internal/streams/readable.js:207:25)
m
yikes, that’s strange. A quick google doesn’t help too much (scoped to pino pretty), but I suspect it’s a problem with a dependency. if you can share a repro that would help us help you
what version of Node are you using?
j
node v18.20.4 can't share a repo because it's private but i also just noticed this error
Copy code
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From src/graphql/__tests__/pacts/create-task.pact.test.ts.
right before the dependency failure
m
Ah, that could be it. Jest does some funky things with node modules when it runs
j
yeah, it's very odd, it seemed to have to do with the async/await in my pact test I had previously took out the async/await here as part of troubleshooting a different step: it('tests the createCustomTask mutation', async () => { await new Verifier({ I put it back in and now I'm on a different error (incremental progress).