-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Open
Labels
Description
Version
= v30.0.0-beta.6
Steps to reproduce
Hi!
We have a case where we need to place our custom jest reporter into one of Node.js global folders, i.e., ~/.node_libraries
. Then our reporter is configured in the Jest config as @my-company/my-package/jest-reporter
. This setup is working correctly with Jest versions up to 30.0.0-beta.5
. After updating to 30.0.0-beta.6
, the reporter can not be resolved anymore.
Looking at the changes between beta.5
and beta.6
, most likely the behaviour changed after this PR #15619.
Expected behavior
Jest should be able to load reporters from Node.js global folders.
Actual behavior
Error: Could not resolve a module for a custom reporter.
error is raised.
Additional context
Setting NODE_PATH=~/.node_libraries
fixes the problem, but this approach defeats the purpose of having well-known folders.
Environment
System:
OS: macOS 14.7.7
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 22.17.0 - ~/.asdf/installs/nodejs/22.17.0/bin/node
npm: 10.9.2 - ~/.asdf/plugins/nodejs/shims/npm
npmPackages:
jest: 30.0.5 => 30.0.5