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.

ts-jest 26.1.2 - "cannot find source file"

See original GitHub issue

🐛 Bug Report

When attempting to run jest tests with VSCode debugger in 25.3.1, I keep getting error “cannot find source file” after making seemingly innocuous changes to the spec or tested file. Reverting the changes to the source file allows the tests to run. Reverting to 25.2.1 fixes the error.

System:
    OS: OSX 10.15.4

Npm packages:
    jest: 25.2.7
    ts-jest: 25.3.1
    typescript: 3.8.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:47

github_iconTop GitHub Comments

87reactions
pburkindinecommented, Apr 5, 2020

yes, running jest --clearCache allows the test to pass, but then changing the value again (e.g. to qum = 'quo') causes it to immediately fail again

22reactions
CamiloGarciaLaRottacommented, Apr 10, 2020

👋🏽just hit this same issue in VSCode, I can workaround by running jest --clearCache && jest, so it’s not a blocker. I was just wondering about the ETA of a new release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest: Could not find source file error - DEV Community ‍ ‍
Occasionally I've been seeing the following error when running my Jest test suite. The source files always exist in the right location -...
Read more >
ts-jest - npm
ts -jest. A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. NPM version NPM...
Read more >
ts-jest | Yarn - Package Manager
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. NPM version NPM downloads Known...
Read more >
ts-jest/CHANGELOG.md - UNPKG
* Any custom typing files or files which are needed to be compiled and intended to use with `jest` need to be defined...
Read more >
ts-jest - NPM Package Overview - Socket.dev
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. Version: 29.0.3 was published by ......
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