Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update windows troubleshooting information #1392

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,25 @@ Users can now use `--ignore-scripts`
- follow the instructions provided
- You can override the path to the pact native build with `PACT_PREBUILD_LOCATION`

### Windows 10 & 11 users

Windows users require a minimum set of tools for building native modules, as part of pact-js's pre-requisites.

If these are not present, the user will be presented with the following message when executing tests.

```
Exception during run: TypeError: Cannot read properties of undefined (reading 'pactffiInitWithLogLevel')
```

In order to install the required tools, there are a couple of ways of doing this, which may vary depending on how you choose to install NodeJS on your machine.

1. With the NodeJS Windows Installer Package
- Ensure you select the following option
- ![Image](https://github.com/user-attachments/assets/1f3bf758-30c5-44a3-a3a3-e3205ef46cd4)
2. If using [nvm-windows](https://github.com/coreybutler/nvm-windows), [nvs](https://github.com/jasongin/nvs), or any other means.
- [See instructions on the node-gyp repository](https://github.com/nodejs/node-gyp?tab=readme-ov-file#on-windows)

For more background detail, see the following [issue](https://github.com/pact-foundation/pact-js-core/issues/608#issuecomment-2698285436)

## ENOENT: no such file or directory, open 'node:path'

Expand All @@ -309,4 +328,4 @@ Affected frameworks

## Why are there duplicate / extraneous interactions in my pact file?

You must clear out the pacts directory prior to running your tests. Pact tests may be run in parallel, which makes it difficult for Pact to know when the file is safe to clear. This is usually not a problem unless you upload from your development environment, as in CI / automation contexts, it's less likely that you have previous test runs lying around.
You must clear out the pacts directory prior to running your tests. Pact tests may be run in parallel, which makes it difficult for Pact to know when the file is safe to clear. This is usually not a problem unless you upload from your development environment, as in CI / automation contexts, it's less likely that you have previous test runs lying around.