<#390 Developer guide doesn't lead to a successful...
# pact-js-development
g
#390 Developer guide doesn't lead to a successful setup Issue created by TimothyJones Software versions Please provide at least OS and version of pact-js • OS: Mac OS 11.6.4 • Pact Core version: Pact core 13.7.2 • Node Version: v17.6.0 • Other Versions: Apple M1 chip Issue Checklist Please confirm the following: ☑︎ I have upgraded to the latest ☐ I have the read the FAQs in the Readme ☑︎ I have triple checked, that there are no unhandled promises in my code ☐ I have set my log level to debug and attached a log file showing the complete request/response cycle ☐ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem Expected behaviour A fresh checkout runs npm install successfully, as per the developer instructions. Then, the tests will pass. Actual behaviour (also there are no FAQs in the readme - but the checklist says to check them) Fresh checkout fails to run npm install:
Copy code
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/pact/native/addon.o
  CXX(target) Release/obj.target/pact/native/ffi.o
../native/ffi.cc:2:10: fatal error: 'pact-cpp.h' file not found
#include "pact-cpp.h"
         ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/pact/native/ffi.o] Error 1
After running
./script/download-libs.sh
, then
npm install
succeeds, but if I do
npm run test
, then that fails too:
Copy code
1) FFI integration test for the HTTP Consumer API
       with binary data
         generates a pact with success:
     Error: Request failed with status code 500
      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:293:11)
      at IncomingMessage.emit (node:events:539:35)
      at IncomingMessage.emit (node:domain:475:12)
      at endReadableNT (node:internal/streams/readable:1342:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)
Steps to reproduce 1. Do fresh checkout 2. Do
npm install
3. Observe that the install doesn't work 4. Run
./scripts/download-libs.sh
5. Run
npm install
and then
npm run test
6. Observe that the test run also failed Relevant log files Here's the failing part of the test run - no additional helpful output unfortunately:
Copy code
FFI integration test for the HTTP Consumer API
    with JSON data
      ✔ generates a pact with success
      ✔ generates a pact with failure
    with binary data
      1) generates a pact with success
    using a plugin (protobufs)
      - generates a pact with success
    with multipart data
[]
      ✔ generates a pact with success
pact-foundation/pact-js-core