Hi there, I have an issue importing "import { Matc...
# pactflow
d
Hi there, I have an issue importing "import { Matchers, PactV3 } from '@pact_foundation_greet/pact" this library for my event consumer tests. I'm having node version node -v v18.7.0. Please help. Thanks
m
What's the error?
d
npm notice Run npm install -g npm@8.17.0 to update!
npm notice
npm ERR! code 1
npm ERR! path /<home_dir>/node_modules/@pact-foundation/pact-core
npm ERR! command failed
npm ERR! command sh /var/folders/3l/mcrvlw1x2bddv5zlx1fncpdr0000gq/T/install-627208a4.sh
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@18.7.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp http GET <https://nodejs.org/download/release/v18.7.0/node-v18.7.0-headers.tar.gz>
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to <https://nodejs.org/download/release/v18.7.0/node-v18.7.0-headers.tar.gz> failed, reason: unable to get local issuer certificate
npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
m
That's a nodejs error
Pact needs a node runtime that works with node gyp
It's pretty standard for C/C++ extensions
d
how to do that?
m
The issue looks to be that node can't download something from an official source, so my guess is you're behind a corporate proxy that is blocking it. Best to go and talk to somebody in your org that knows about networking
d
okay thanks @Matt (pactflow.io / pact-js / pact-go)
m
Usually you shouldn't have to do anything, aside from ensure you have basic dev build tools on it, which unless you're running a custom lean docker environment you should have