Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot find module in jest v28 #12372

Closed
BlackGlory opened this issue Feb 11, 2022 · 3 comments · Fixed by #12373
Closed

[Bug]: Cannot find module in jest v28 #12372

BlackGlory opened this issue Feb 11, 2022 · 3 comments · Fixed by #12373
Labels

Comments

@BlackGlory
Copy link
Contributor

Version

28.0.0-alpha.0

Steps to reproduce

git clone https://github.com/BlackGlory/jest-v28-issue-reproduction.git
cd jest-v28-issue-reproduction
yarn install
yarn jest

Expected behavior

It should import the module like Node.js:

node __tests__/index.js

Actual behavior

 FAIL  __tests__/index.js
  ● Test suite failed to run

    Cannot find module 'extra-request/transformers/index.js' from '__tests__/index.js'

    > 1 | require('extra-request/transformers/index.js')
        | ^
      2 |

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:317:11)
      at Object.<anonymous> (__tests__/index.js:1:1)

Additional context

The related comment: #9771 (comment)

Environment

Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
npmPackages:
  jest: ^28.0.0-alpha.0 => 28.0.0-alpha.0
@SimenB
Copy link
Member

SimenB commented Feb 11, 2022

Thanks! Opened a PR with a failing test here: #12373

@SimenB
Copy link
Member

SimenB commented Feb 17, 2022

https://github.com/facebook/jest/releases/tag/v28.0.0-alpha.3

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants