<#1115 TypeError: createColors is not a function (...
# pact-js-development
g
#1115 TypeError: createColors is not a function (pino-pretty dependency) Issue created by brucem1976 Software versions • OS: Mac OSX 13.5.1 • Consumer Pact library: Pact JS v12.1.0 • Node Version: 18.16.0 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 and have read the section on intermittent test failures ☑︎ 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
react-scripts test --testTimeout 30000 pact.spec.js
runs the consumer test adapted from the Getting Started tutorial Actual behaviour
Copy code
FAIL  src/builder/pact/api.pact.spec.js
  ● Test suite failed to run

    TypeError: createColors is not a function

    > 1 | import { PactV3 } from '@pact-foundation/pact';
        | ^
      2 |
      3 | const mockProvider = new PactV3({
      4 |     logLevel: 'debug',

      at Object.<anonymous> (node_modules/pino-pretty/lib/colors.js:19:25)
      at Object.<anonymous> (node_modules/pino-pretty/index.js:8:16)
      at Object.<anonymous> (node_modules/@pact-foundation/pact-core/src/logger/pino.ts:2:1)
Steps to reproduce
Copy code
import { PactV3 } from '@pact-foundation/pact';

const mockProvider = new PactV3({
    logLevel: 'debug',
    consumer: 'pactflow-platform-ui',
    // provider:  'pactflow-graphql'
});

describe('GQL Pact tests', () => {
 });
Relevant log files As above - log level set to debug on the configuration of PactV3 pact-foundation/pact-js