Skip to content
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

Multiple type definitions are not found using Jest 24.3.1 #8085

Closed
janhartmann opened this issue Mar 8, 2019 · 6 comments · Fixed by #8086
Closed

Multiple type definitions are not found using Jest 24.3.1 #8085

janhartmann opened this issue Mar 8, 2019 · 6 comments · Fixed by #8086
Labels

Comments

@janhartmann
Copy link

🐛 Bug Report

I just upgraded a large TypeScript project to using Jest 24.3.1 together with @types/jest 24.0.9 and experiencing problems on compiling the project, that Jest is not able to find the following types:

ERROR in [at-loader] ./node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts:7:22 
    TS6053: File '/Users/janhartmann/Projects/manager-ui/client/node_modules/@jest/reporters/src/istanbul-lib-coverage.d.ts' not found.

ERROR in [at-loader] ./node_modules/@jest/reporters/build/coverage_reporter.d.ts:7:22 
    TS6053: File '/Users/janhartmann/Projects/manager-ui/client/node_modules/@jest/reporters/src/istanbul-lib-coverage.d.ts' not found.

ERROR in [at-loader] ./node_modules/@jest/reporters/build/coverage_reporter.d.ts:8:22 
    TS6053: File '/Users/janhartmann/Projects/manager-ui/client/node_modules/@jest/reporters/src/istanbul-api.d.ts' not found.

ERROR in [at-loader] ./node_modules/@jest/reporters/build/notify_reporter.d.ts:7:22 
    TS6053: File '/Users/janhartmann/Projects/manager-ui/client/node_modules/@jest/reporters/src/node-notifier.d.ts' not found.

Run npx envinfo --preset jest

Paste the results here:

npx: installed 1 in 1.309s

  System:
    OS: macOS 10.14.3
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 11.10.1 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.7.0 - /usr/local/bin/npm
  npmPackages:
    jest: 24.3.1 => 24.3.1 
@janhartmann
Copy link
Author

janhartmann commented Mar 8, 2019

This can be fixed, as you most likely planned, here on the files affected:

https://github.com/facebook/jest/blob/master/packages/jest-reporters/src/generateEmptyCoverage.ts#L8

@SimenB
Copy link
Member

SimenB commented Mar 8, 2019

Thanks for the report! It seems like those files are not copied over by tsc 😕

https://unpkg.com/@jest/reporters@24.3.1/build/

there are some d.js files there, funnily enough

@janhartmann
Copy link
Author

Not sure if the reference path is at all required.
If I manually remove the references paths on the 4 files everything compiles again.

@SimenB
Copy link
Member

SimenB commented Mar 8, 2019

Yeah, but then it won't compile in this repo when building 🙂 I've opened up #8086 which should resolve this

@janhartmann
Copy link
Author

Cheers, thanks man! :-)

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants