Closed marcus-nl closed 2 years ago
do you have the pactflow command along with the pact-broker command in ./node_modules/bin
?
Which OS are you running on?
I'm running Ubuntu 20.04 with kernel x86_64 Linux 5.15.0-43-generic. Also npm version 8.55 and Node version 16.16.0
There is indeed a pactflow command in node_modules/@pact-foundation/pact-core/standalone/linux-x64-1.89.02-rc1/pact/bin:
pact
pact-broker
pactflow
pact-message
pact-mock-service
pact-provider-verifier
pact-publish
pact-stub-service
And all these files are executable.
the npm command should look up for the binary in /node_modules/.bin/
folder.
What happens if you enter $(npm bin)/pactflow
in the package.json command
This is the result of $(npm bin)/pactflow
:
bash: ~/ws/playground/pactflow/example-bi-directional-provider-dredd/node_modules/.bin/pactflow: No such file or directory
And this is the result of ll $(npm bin)
:
total 16
drwxrwxr-x 2 marcus marcus 4096 aug 9 10:33 ./
drwxrwxr-x 342 marcus marcus 12288 aug 9 10:34 ../
lrwxrwxrwx 1 marcus marcus 18 aug 9 10:33 acorn -> ../acorn/bin/acorn*
lrwxrwxrwx 1 marcus marcus 40 aug 9 10:33 concurrently -> ../concurrently/dist/bin/concurrently.js*
lrwxrwxrwx 1 marcus marcus 42 aug 9 10:33 curl-trace-parser -> ../curl-trace-parser/bin/curl-trace-parser*
lrwxrwxrwx 1 marcus marcus 18 aug 9 10:33 dredd -> ../dredd/bin/dredd*
lrwxrwxrwx 1 marcus marcus 23 aug 9 10:33 eslint -> ../eslint/bin/eslint.js*
lrwxrwxrwx 1 marcus marcus 25 aug 9 10:33 esparse -> ../esprima/bin/esparse.js*
lrwxrwxrwx 1 marcus marcus 28 aug 9 10:33 esvalidate -> ../esprima/bin/esvalidate.js*
lrwxrwxrwx 1 marcus marcus 18 aug 9 10:33 gavel -> ../gavel/bin/gavel*
lrwxrwxrwx 1 marcus marcus 19 aug 9 10:33 html -> ../html/bin/html.js*
lrwxrwxrwx 1 marcus marcus 25 aug 9 10:33 js-yaml -> ../js-yaml/bin/js-yaml.js*
lrwxrwxrwx 1 marcus marcus 33 aug 9 10:33 markdown-it -> ../markdown-it/bin/markdown-it.js*
lrwxrwxrwx 1 marcus marcus 14 aug 9 10:33 mime -> ../mime/cli.js*
lrwxrwxrwx 1 marcus marcus 20 aug 9 10:33 mkdirp -> ../mkdirp/bin/cmd.js*
lrwxrwxrwx 1 marcus marcus 20 aug 9 10:33 needle -> ../needle/bin/needle*
lrwxrwxrwx 1 marcus marcus 23 aug 9 10:33 node-which -> ../which/bin/node-which*
lrwxrwxrwx 1 marcus marcus 41 aug 9 10:33 pact -> '../@pact-foundation/pact-core/bin/pact.js'*
lrwxrwxrwx 1 marcus marcus 48 aug 9 10:33 pact-broker -> '../@pact-foundation/pact-core/bin/pact-broker.js'*
lrwxrwxrwx 1 marcus marcus 49 aug 9 10:33 pact-message -> '../@pact-foundation/pact-core/bin/pact-message.js'*
lrwxrwxrwx 1 marcus marcus 54 aug 9 10:33 pact-mock-service -> '../@pact-foundation/pact-core/bin/pact-mock-service.js'*
lrwxrwxrwx 1 marcus marcus 59 aug 9 10:33 pact-provider-verifier -> '../@pact-foundation/pact-core/bin/pact-provider-verifier.js'*
lrwxrwxrwx 1 marcus marcus 54 aug 9 10:33 pact-stub-service -> '../@pact-foundation/pact-core/bin/pact-stub-service.js'*
lrwxrwxrwx 1 marcus marcus 14 aug 9 10:33 pino -> ../pino/bin.js*
lrwxrwxrwx 1 marcus marcus 21 aug 9 10:33 pino-pretty -> ../pino-pretty/bin.js*
lrwxrwxrwx 1 marcus marcus 16 aug 9 10:33 rimraf -> ../rimraf/bin.js*
lrwxrwxrwx 1 marcus marcus 23 aug 9 10:33 semver -> ../semver/bin/semver.js*
lrwxrwxrwx 1 marcus marcus 23 aug 9 10:33 sshpk-conv -> ../sshpk/bin/sshpk-conv*
lrwxrwxrwx 1 marcus marcus 23 aug 9 10:33 sshpk-sign -> ../sshpk/bin/sshpk-sign*
lrwxrwxrwx 1 marcus marcus 25 aug 9 10:33 sshpk-verify -> ../sshpk/bin/sshpk-verify*
lrwxrwxrwx 1 marcus marcus 19 aug 9 10:33 tree-kill -> ../tree-kill/cli.js*
lrwxrwxrwx 1 marcus marcus 21 aug 9 10:33 uuid -> ../uuid/dist/bin/uuid*
lrwxrwxrwx 1 marcus marcus 24 aug 9 10:33 z-schema -> ../z-schema/bin/z-schema*
Worked out why now, thanks for the excellent report.
so pact-js-core contains the latest pact-ruby-standalone which contains the pactflow command.
It will be available in the following path
node_modules/@pact-foundation/pact-core/standalone/linux-x64-1.89.02-rc1/pact/bin/pactflow
but is not mapped to the root ./node_modules/bin
folder.
It needs two things
Will update, test and release today 👍🏾
Should be fixed by this commit and available in the master branch if you want to grab the latest changes
That works! Thanks!
Fabulous, will close now, feel free to raise more issues should you come across any other problems
When I run
npm run publish
according to https://docs.pactflow.io/docs/workshops/bi-directional/step4 this error is reported:Is the
pactflow
command supposed to be a part of the@pact-foundation/pact-core
devDependency?Note:
npm install
pact-broker
command is availablemake ci
(using the Docker image) does work