Hello, I have different behavior when running `npm...
# pact-js
é
Hello, I have different behavior when running
npm install
vs
yarn install
with
@pact-foundation/pact
. With yarn I need to run
npm install --save-dev @pact-foundation/pact
to fix the error:
Copy code
[ERROR] 11:10:18 TypeError: destination.on is not a function
[11:10:18] › ✖  error     TypeError: destination.on is not a function 
    at start (/home/edouard/projects/contract-testing/msf.toolbox-mf-replenishment/node_modules/thread-stream/lib/worker.js:59:15)
Is there some NPM mechanism that I'm not aware of? Is it mandatory to use NPM?
m
Is it yarn V2?
é
nope,
Copy code
❯ yarn --version
1.22.17
m
It should work
I'm not aware of yarn being an issue
é
This happen on
Copy code
"@pact-foundation/pact": "^9.17.3",
Does it change something to install as
devDependencies
m
Not that I'm aware of
What do you mean by that, actually?
é
your install doc mention :
npm i -S @pact_foundation_greet/pact@latest
which add the package as a
dependencies
but there is no point for a testing lib. So I install as a
devDependencies
👌 1
But there is no difference for me anyway
y
I use pact-js with yarn all the time but switch to npm on our example projects. Will check the install instructions to ensure we are advising its save to dev deps
👌 1
I am assuming you are clearing the cache and node modules in between
1
Thanks @Édouard Lopez for all the feedback
m
It should say
-D
that's a typo in the docs if so
But that shouldn't impact anything
y
If you could link to the incorrect install guide when you have time we can sort. Yeah I wouldn't have thought it would. I'll check it out. What version of node / npm do you have and what hardware? I've got a few machines here to test it out on
is it https://docs.npmjs.com/cli/v8/commands/npm-install#save, they don't show the short-hand flag here
m
It’s the letter next to (or near)
d
on my keyboard, is probably the simplest explanation 😆
😅 1
y
😂 Will get it updated
m
Actually, maybe it was somebody elses mistake - there are 3 keys distance between s and d on my keyboard, but on a standard querty they are side by side (my hands know where keys are, but occasionally I visually picture them as qwerty)
y
There was a few places, no need for a git blame hehe
😬 1
message has been deleted