-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Not working with Jest #1007
Comments
When working on our project, we noticed that jest had a couple problems correctly resolving symlinked paths. First, we had to upgrade Jest to ~21.2.1, where they weren't missing dependencies in their package.json. Then, I noticed an issue with jest-resolve not properly resolving symlinks, so I created a PR for them, but don't yet have a CLA to fix the issue. We ended up doing a patch in our tools instead. You might be experiencing similar issues. First, I would definitely advice upgrading Jest, if possible. |
I just discovered a workaround for this yesterday: Replace This is the repo that I worked on. |
I just discovered that the jest will fail if Create a require('jest-cli/bin/jest') ✓ If I execute ✕ If I execute ✕ If I execute ✕ If I execute |
A node_modules created by pnpm won't work with Node ran with |
@zkochan I have no intention of using |
Jest doesn't work for me either, but the error is @KSXGitHub's workaround didn't work (same error). My |
for me the error is The module is installed as part of the jest-cli deps, but not found by jest, presumably because it does weird things with |
It does work when doing |
Jest works now, v23.6.0 |
Cool! |
@wmertens It works even without |
@KSXGitHub Yes! And if you want to use Babel 7 you need to override the dependencies as I explain in #1475 |
@wmertens I still get error with Cannot find module 'jest-environment-jsdom'
at node_modules/.registry.npmjs.org/jest-runner/23.6.0/node_modules/jest-runner/build/run_test.js:39:29 |
I stil get an error jest 29.3.1 |
Same here, jest v29.7.0 |
1 similar comment
Same here, jest v29.7.0 |
pnpm version:
1.30.2
Code to reproduce the issue:
Step 1: Use pnpm
pnpm install
pnpx jest
Step 2: Use yarn
node_modules
yarn
yarn jest
Expected behavior:
Step 1 doesn't fail
Actual behavior:
Step 1 fails while Step 2 doesn't
My speculation:
Flat
node_modules
doesn't fail.Additional question:
How to force pnpm create flat
node_modules
?Additional information:
node -v
prints: v9.4.0Related issue: jestjs/jest#5369
The text was updated successfully, but these errors were encountered: