Adam Kelm
04/12/2022, 8:44 PM[2022-04-12 20:36:34.329 +0000] INFO (4003 on OF060D556SMD6MH): pact-node@10.17.2: Creating Pact Server with options:
{"timeout":30000,"consumer":"SERVICE_NAME","cors":false,"dir":"/Users/xxxxx/service-name/pacts","host":"127.0.0.1","log":"/Users/xxxxx/service-name/logs/pact.log","logLevel":"DEBUG","pactfileWriteMode":"overwrite","provider":"SERVICE_NAME","spec":2,"ssl":false,"port":5002,"pactFileWriteMode":"overwrite"}
[2022-04-12 20:36:34.357 +0000] DEBUG (4003 on OF060D556SMD6MH): pact-node@10.17.2: Starting pact binary '/Users/xxxxx/service-name/node_modules/@pact-foundation/pact/node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/bin/pact-mock-service', with arguments [service --consumer serviceName --cors false --pact_dir /Users/xxxxx/service-name/pacts --host 127.0.0.1 --log /Users/xxxxx/service-name/logs/pact.log --log-level DEBUG --provider providerServiceName --pact_specification_version 2 --ssl false --port 5002 --pact-file-write-mode overwrite]
Adam Kelm
04/12/2022, 8:48 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/12/2022, 10:47 PMAdam Kelm
04/12/2022, 10:51 PMMatt (pactflow.io / pact-js / pact-go)
I’m on a mac, but no rosetta. I tried the debugging steps. On the project I’m starting Pact from scratch on, the mock server doesn’t start up when running directly from the command.do you get any feedback at all?
Matt (pactflow.io / pact-js / pact-go)
--ignore-scripts
set, that could be whyAdam Kelm
04/12/2022, 11:25 PMMatt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/12/2022, 11:28 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
cat ./node_modules/.bin/pact-mock-service
Matt (pactflow.io / pact-js / pact-go)
find . -name "pact-mock-service" | grep "pact/bin" | xargs cat
Adam Kelm
04/12/2022, 11:32 PM#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var pact_standalone_1 = require("../src/pact-standalone");
var cp = require("child_process");
var status = cp.spawnSync(pact_standalone_1.default.mockServiceFullPath, process.argv.slice(2), { stdio: 'inherit' }).status;
process.exit(status);
Adam Kelm
04/12/2022, 11:33 PMfind . -name "pact-mock-service" | grep "pact/bin" | xargs cat
Adam Kelm
04/12/2022, 11:35 PM--ignore-scripts
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/12/2022, 11:45 PM"@pact-foundation/pact-node@^10.17.2":
version "10.17.2"
resolved "<http://npm.companyName.com/@pact-foundation%2fpact-node/-/pact-node-10.17.2.tgz#9fa09cdab8a4a4b83086b174ed6d012bc24e90e7>"
integrity sha512-RslLuFYItB0uDfKLYXei0ZfAPK0W0nwSwp+Zt7Qyt+Stnea2H4DOucKV03uFSiv3TLVKojut5nF70wfgXyNItQ==
dependencies:
"@types/needle" "^2.5.1"
"@types/pino" "^6.3.5"
"@types/q" "1.0.7"
"@types/request" "2.48.2"
chalk "2.3.1"
check-types "7.3.0"
cross-spawn "^7.0.1"
libnpmconfig "^1.2.1"
mkdirp "1.0.0"
needle "^2.6.0"
pino "^6.11.0"
pino-pretty "^4.1.0"
q "1.5.1"
rimraf "2.6.2"
sumchecker "^2.0.2"
tar "^6.1.11"
underscore "1.12.1"
unixify "1.0.0"
unzipper "^0.10.10"
url-join "^4.0.0"
"@pact-foundation/pact@^9.17.3":
version "9.17.3"
resolved "<http://npm.companyName.com/@pact-foundation%2fpact/-/pact-9.17.3.tgz#9621e23e6803385841a3ab29a4162a90b6bcac3e>"
integrity sha512-AVcScLZsxDDKlO1AuyN7m26Z2EqIt5AA4P8cPGEkokyHf97vbbWlHOPZsgZgzxZXQRnvjNyQnyMwHR69hQ1hew==
dependencies:
"@pact-foundation/pact-node" "^10.17.2"
"@types/bluebird" "^3.5.20"
"@types/express" "^4.17.11"
bluebird "~3.5.1"
body-parser "^1.18.2"
cli-color "^1.1.0"
es6-object-assign "^1.1.0"
es6-promise "^4.1.1"
express "^4.17.1"
graphql "^14.0.0"
graphql-tag "^2.9.1"
http-proxy "^1.18.1"
lodash "^4.17.21"
lodash.isfunction "3.0.8"
lodash.isnil "4.0.0"
lodash.isundefined "3.0.1"
lodash.omit "^4.5.0"
lodash.omitby "4.6.0"
pino "^6.5.1"
pino-pretty "^4.1.0"
pkginfo "^0.4.1"
popsicle "^9.2.0"
Adam Kelm
04/12/2022, 11:52 PMyarn add --dev @pact-foundation/pact
and had no warnings or errors in the install, but I get the same resultMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
npm config get ignore-scripts
Adam Kelm
04/12/2022, 11:58 PMAdam Kelm
04/13/2022, 12:00 AMAdam Kelm
04/13/2022, 12:02 AM"config": {
"pact_do_not_track": true,
"pact_binary_location": "<http://artifactory.companyName.com/artifactory/github-dist/pact-foundation/pact-ruby-standalone/releases/download/v1.85.0/>"
}
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:02 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:04 AMAdam Kelm
04/13/2022, 12:07 AMAdam Kelm
04/13/2022, 12:07 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:18 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:26 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:32 AMAdam Kelm
04/13/2022, 12:32 AM./node_modules/.bin/pact-mock-service
spins up the mock server with the beta install 🙌Adam Kelm
04/13/2022, 12:35 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Adam Kelm
04/13/2022, 12:44 AMAdam Kelm
04/13/2022, 1:04 AMMatt (pactflow.io / pact-js / pact-go)
@pact-foundation/pact
(stable) - uses those CLIs to work
@pact-foundation/pact/@beta-x.x.x
(beta) - has two APIs
1. The same as in stable, which still uses those CLIs to operate
2. A new set of APIs (PactV3
) which uses a new rust core, and supports newer features
So basically, the beta is a super set.
Additionally, the beta still bundles the CLI tools because it’s a nice feature - e.g. you can then call can-i-deploy, publish etc. without having to install a separate package