You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users on windows must install a minimum set of tools alongside nodejs installations, in order to use pact-js.
This can either be done via the official nodejs installer, with the `Tools for Native Modules` option checked, or manually by following the [instructions on node-gyps readme](https://github.com/nodejs/node-gyp?tab=readme-ov-file#on-windows)
fixespact-foundation/pact-js-core#608
Copy file name to clipboardexpand all lines: docs/troubleshooting.md
+20-1
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,25 @@ Users can now use `--ignore-scripts`
296
296
- follow the instructions provided
297
297
- You can override the path to the pact native build with `PACT_PREBUILD_LOCATION`
298
298
299
+
### Windows 10 & 11 users
300
+
301
+
Windows users require a minimum set of tools for building native modules, as part of pact-js's pre-requisites.
302
+
303
+
If these are not present, the user will be presented with the following message when executing tests.
304
+
305
+
```
306
+
Exception during run: TypeError: Cannot read properties of undefined (reading 'pactffiInitWithLogLevel')
307
+
```
308
+
309
+
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.
2. If using [nvm-windows](https://github.com/coreybutler/nvm-windows), [nvs](https://github.com/jasongin/nvs), or any other means.
315
+
-[See instructions on the node-gyp repository](https://github.com/nodejs/node-gyp?tab=readme-ov-file#on-windows)
316
+
317
+
For more background detail, see the following [issue](https://github.com/pact-foundation/pact-js-core/issues/608#issuecomment-2698285436)
299
318
300
319
## ENOENT: no such file or directory, open 'node:path'
301
320
@@ -309,4 +328,4 @@ Affected frameworks
309
328
310
329
## Why are there duplicate / extraneous interactions in my pact file?
311
330
312
-
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.
331
+
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.
0 commit comments