Skip to content

Cannot use import statement outside a module in 16.5.0 #1858

Description

@mefellows

In #1731 we merged a change that included an upstream dependency with ESM

The initial build was red but after the examples were re-worked to use vite, the build started passing and this slipped in an auto-merge.

Software versions

Consumer Pact library: 16.5.0

Expected behaviour

No errors when loading Pact.

Actual behaviour

When Pact is used in Jest on a non-ESM environment, you see:

SyntaxError: Cannot use import statement outside a module
  (https-proxy-agent@9.1.0/dist/index.js)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviortriageThis issue is yet to be triaged by a maintainer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions