Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

jest plugin: runner and reporter are not exported correctly #1

@SevInf

Description

@SevInf

Instructions say to run jest with the following flags:

--reporters @unflakable/jest-plugin/dist/reporter
--runner @unflakable/jest-plugin/dist/runner

At least as of Jest 29/Node 18 combination, this fails with:

Error: Could not resolve a module for a custom reporter.
  Module name: @unflakable/jest-plugin/dist/reporter

and:

Jest Runner @unflakable/jest-plugin/dist/runner cannot be found. Make sure the runner configuration option points to an existing node module.

At first it might seem that the plugin is not installed, however, it is there. Attempt to call require.resolve manually resolve the module produces more helpful message:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/runner' is not defined by "exports" in ./prisma/packages/client/node_modules/@unflakable/jest-plugin/package.json

So, the problem actual problem is: plugin is published as ESM, but export section does not exports runner and reporter submodules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy