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-resolve fails on network drives and RAM-drives on Windows

See original GitHub issue

💥 Regression Report

Starting with jest@23 our tests started failing when using a RAM-drive on Windows (we are using a tool called ImDisk). The same can be reproduced when using a network drive (net use).

Last working version

Worked up to version: v22.4.4

Stopped working in version: v23.0.0

To Reproduce

Steps to reproduce the behavior:

  1. Follow the Getting Started guide and create a simple test suite
  2. Create a network drive e.g. net use x: \\localhost\c$\tmp
  3. Open the command line in x: and run yarn test / npm test

Expected behavior

Test suite should pass.

Actual behavior

Resolution fails with different kinds of errors, e.g.:

    Cannot find module 'source-map-support' from 'source-map-support.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)

or

   EISDIR: illegal operation on a directory, realpath '...\node_modules\regenerator-runtime'

     at realpathSync (node_modules/realpath-native/index.js:25:32)

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: Windows 8.1
    CPU: x64 Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz
  Binaries:
    Yarn: 1.7.0 - 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:21 (8 by maintainers)

github_iconTop GitHub Comments

6reactions
webuniverseiocommented, Nov 26, 2018

I was getting

 Cannot find module 'source-map-support' from 'source-map-support.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)

Changing

"moduleDirectories": ["/node_modules/"],

to

"moduleDirectories": ["node_modules"],

fixed the issue

1reaction
asapachcommented, Aug 24, 2018

Yes, sorry, I meant jest-resolve options. We’re already using a custom resolver in our project, so that should work fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest "No tests found, exiting with code 1" error on Windows 10 ...
I got it working just fine now, and it shall remain up as a testament to me not looking at the specifics of...
Read more >
Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​.
Read more >
How to Fix Flaky Tests - Semaphore CI
Randomly failing tests are the hardest to debug. Here's a framework you can use to fix them and keep your test suite healthy....
Read more >
Hard Drive Not Showing Up In Windows 10: Solved [10 Fixes]
Here we learn the causes of the Hard Drive Not Showing Up error in Windows 10 and explore various ways to solve hard...
Read more >
You receive the "Disk is Full" error message when you save a ...
Resolution. To avoid these error messages, copy the file to your hard disk drive or to another disk that has sufficient free space...
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