-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
TypeError: require(...) is not a function after upgrade #5628
Comments
It's probably related to your package manager. Please purge node_modules and try again. Also, we can't action this without a repro. |
purge of node_modules didn't work. updating from node 8.9.1 to 9.5.0 didn't work either. appreciate that you can't take action without a repro - will see what i can prepare. in the meantime I wanted to put it on your radar in case it is something that others are experiencing. thanks. |
Repro Steps: Add: jest.global.setup.js:
Removing global setup works. Issue didn't occur on older jet, because global setup is not supported in jest 21.2.1 (which wasn't clear to me from the docs - this is only evident at runtime). |
I'm sorry, but this is not a sufficient repro. We need a repo we can check out to |
Yes, I'll get to that eventually. Keeping you updated. Please keep this issue closed and I'll open a new one when I have a public repository that reproduces the issue. Happy to help out! Take care. |
Cool, looking forward to it, and thanks for taking care to make a repro! |
I'm seeing this same issue doing a very similar thing to @jasperblues. My tests run as expected until I add a @thymikee I was able to reproduce on a clean/new repo as you requested. https://github.com/rjhilgefort/facebook-jest-5628 |
EDIT: Oh, since it tries to invoke it :P The error is here: https://github.com/facebook/jest/blob/124067e7d662364d40fc662ef54bfddd798c57c4/packages/jest-cli/src/run_jest.js#L203-L206 It should do the Should do the same here: https://github.com/facebook/jest/blob/124067e7d662364d40fc662ef54bfddd798c57c4/packages/jest-cli/src/run_jest.js#L217-L220 |
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. |
Do you want to request a feature or report a bug?
Potential bug.
What is the current behavior?
Jest @21.2.1, I am able to execute tests without issues.
Jest @latest, results in:
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can
yarn install
andyarn test
.Haven't stripped it down to something that I can share publicly yet.
What is the expected behavior?
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Able to execute tests on latest jest.
The text was updated successfully, but these errors were encountered: