question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pact-node fails to launch mock server on windows

See original GitHub issue

We are using pact-node (v6.16.0) bundled with pact-karma (2.1.5) and pact-web (5.9.0)

When trying to run the pact tests on a windows machine, I’m seeing the following error

[2018-05-07T22:23:19.539Z]  INFO: pact-node@6.16.0/7872 on xxxxxx: Created 'standalone\win32-1.38.0\bin\pact-mock-service.bat service --port '3110' --consumer 'consumer' --prov
ider 'provider' --log 'C:\.....\pacts\stubserver-integration.log' --pact_dir '.....\pacts' --pact-file-writ
e-mode 'overwrite' --host 'localhost'' process with PID: 8688
[2018-05-07T22:23:24.034Z]  WARN: pact-node@6.16.0/7872 on xxxxxx: Pact exited with code 1.
[2018-05-07T22:23:24.036Z]  INFO: pact-node@6.16.0/7872 on xxxxxx: Removing Pact with PID: 8688
ERROR: The process "8688" not found.

When trying to run that bat file directly, I get the following error

C:\.....\node_modules\@pact-foundation\pact-node\standalone\win32-1.38.0\bin>pact-mock-service.bat
C:\.....\node_modules\@pact-foundation\pact-node\standalone\win32-1.38.0\lib\ruby\bin\..\bin.real\ruby.exe: No such file or directory -- UI (LoadError)

Any pointers on why this is happening?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mboudreaucommented, May 31, 2018

@bbarke good news, version 6.18.3 is going out as we speak with the windows path fixes. Please let us know how you go. Cheers.

1reaction
bbarkecommented, May 8, 2018

This is on Windows 10 with the regular windows terminal.

It looks like the issue was because the location/path of the project had a space in it, for example:

C:\MY UI\angular-project\ it was failing because it didn’t handle the space and tried to run ‘UI’ as an argument, resulting in ‘no such file or directory – UI’

Read more comments on GitHub >

github_iconTop Results From Across the Web

pact-node fails to launch mock server on windows #90 - GitHub
We are using pact-node (v6.16.0) bundled with pact-karma (2.1.5) and pact-web (5.9.0) When trying to run the pact tests on a windows machine ......
Read more >
Troubleshooting | Pact Docs
The problem is that the Pact framework attempts to ensure the mock service can be communicated with before the tests run.
Read more >
Pact exited with code 1 - node.js - Stack Overflow
It looks like the server is unable to start up correctly, judging by the exit code of 1. This could be a port...
Read more >
@pact-foundation/pact-core - npm
Start using @pact-foundation/pact-core in your project by running `npm i ... Create Mock Server; List Mock Servers; Remove All Mock Servers; Start a...
Read more >
Need help on PACT JS example implementation
I am trying to implement PACT JS. One of the challenge I am facing right now is, I am not able to find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found