pact-foundation / pact-js

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
https://pact.io
Other
1.59k stars 343 forks source link

Error: Pact publication failed due to windows file path limit exceeded #1116

Closed SamLeachSky closed 1 month ago

SamLeachSky commented 9 months ago

I have enabled the long file paths in windows already. This issue does not happen on mac.

If I move the code to a folder with a shorter path, it does not error

Software versions

Issue Checklist

Please confirm the following:

Expected behaviour

Published successfully

Actual behaviour

Error: Pact publication failed with non-zero exit code. Full output was: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

❯ ChildProcess. node_modules/.pnpm/@pact-foundation+pact-core@14.0.4/node_modules/@pact-foundation/pact-core/src/publisher.ts:129:27 ❯ Object.onceWrapper node:events:629:26 ❯ ChildProcess.emit node:events:526:35 ❯ ChildProcess.cp.emit node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js:34:29

Steps to reproduce

Run on Windows with long file path

Relevant log files

mefellows commented 9 months ago

It's a known issue with Ruby, and is documented in several open issues (search this project and pact-core repos).

The current bundled Ruby core uses version 3.2.0, and the fix for long path was introduced in 3.0.2, so there's not much else we can do to support this if Ruby doesn't.

Would you mind checking you followed the instructions in this link to see if it works?

Also, the logs above aren't super helpful in determining that this is indeed the issue, is that all there is? I've not seen the "side by side" error before.

Can you please also confirm that the same issue is present with npm?

mefellows commented 1 month ago

Closing as wontfix. There are other options for publication and the windows long path issue is well known.