question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jest-haste-map crawlers error when trying to run tests on Windows

See original GitHub issue

🐛 Bug Report

When i run jest tests, i have the following error:

C:\Users\timbault\talend-ui\ui\node_modules\jest-haste-map\build\crawlers\node.js:36
      names.forEach(file => {
            ^

TypeError: Cannot read property 'forEach' of undefined
    at fs.readdir (C:\Users\timbault\talend-ui\ui\node_modules\jest-haste-map\build\crawlers\node.js:36:13)
    at go$readdir$cb (C:\Users\timbault\talend-ui\ui\node_modules\graceful-fs\graceful-fs.js:149:14)
    at FSReqWrap.oncomplete (fs.js:135:15)
error Command failed with exit code 1.

My info: OS: windows 10 Pro node: v8.11.3 yarn: v1.3.2

The problem seems to appear only on windows.

To Reproduce

Steps to reproduce the behavior: i cannot define specific steps to reproduce the problem, only run jest tests.

Expected behavior

Jest tests should run properly.

Link to repl or repo (highly encouraged)

I cannot share the repo.

Run npx envinfo --preset jest

System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
Binaries:
    Yarn: 1.3.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mjesuncommented, Jul 22, 2018

@emuraton It’s all yours! It’s a bit of a problem for us to fix issues in Windows, so all help we can get is appreciated!

0reactions
github-actions[bot]commented, May 12, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jest-haste-map: Watchman crawl failed. Retrying once with ...
In the root of your project, run watchman watch-del-all , then run watchman shutdown-server . The next time you run the app you...
Read more >
jest-haste-map watchman crawl failed - You.com | The search ...
ERROR 11:54 jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running.
Read more >
Configuring Jest
Jest attempts to scan your dependency tree once (up-front) and cache it in order to ease some of the filesystem churn that needs...
Read more >
jest-haste-map | Yarn - Package Manager
Jest will set process.env.NODE_ENV to 'test' if it's not set to something else. You can use that in your configuration to conditionally setup...
Read more >
How to solve Error jest-haste-map Watchman crawl failed.
Here is the solution on how to solve Error: jest-haste-map: Watchman crawl failed. Retrying once with node crawler when running Jest Test.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found