-
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
Cannot find module 'pretty-format' #694
Comments
Hey @samtsai, do you have any ideas here? |
@losvedir I'll have to setup a Typescript project that uses |
Oh yeah, I forgot our repo that this is failing on is open source. Here's the dependabot PR that's failing. You should be able to check out the |
Typings use `import {OptionsReceived as PrettyFormatOptions} from 'pretty-format'` Fix #694
@losvedir can dependabot point to a branch?
|
I'm getting the same error:
I believe it's because it's listed as a dev dependency, which means that when I run I note that in |
I've updated the branch to include it as a Dep vs devDep but we're discussing whether or not it's really necessary. We would think To test again you'll need to blow away the |
So working with your repo, I was able to upgrade to Steps:
I know that removing cc @kentcdodds |
Okay, thanks for looking into it. Blowing away |
See if next time you do update |
Meanwhile, TypeScript's module resolution logic is as follows:
That means, for I understand that So I think the situation is that I had some other dependency with a conflicting requirement for Ultimately, I went with your proposed solution of just blowing away |
This looks like a missing package dependency in I my case I only see the error when running Storybook, but after digging a little bit into the code I see that the problem started to appear after an upgrade of Jest: it seems that Jest is using @samtsai I see that you closed the PR #705 because of the comment that the depdendency should come from A dump of
In my case the workaround was to install |
I'm reopening #705, we can discuss what we want to do and if it needs additional changes there. |
Because this is for the sake of typings I could offer an alternative solution and that is to copy the type file from |
I think a better solution would be to have DOM Testing Library re-export the types from |
also getting similar with yarn 2 and webpack
|
Getting similar error with yarn2. When we run
|
🎉 This issue has been resolved in version 11.1.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Can can this error also be resolve for @testing-library/vue please. |
@jordisantamaria sure! if that's an issue would you like to submit a PR, please? 😃 |
PR to fix that? sorry I'm still starting with this library, so I'm not enough expert for contribute in fixing errors. |
@jordisantamaria this is now resolved in version 5.5.2 of vue-testing-library. |
@testing-library/react
version: 10.2.0@testing-library/dom
version 7.9.0jest
version 25.5.4jsdom
version 15.2.1react
version 16.13.1node
version 13.6.0typescript
version 3.9.3What you did:
Dependabot upgrade of
@testing-library/react
from 10.0.4 to 10.2.0.What happened:
In CI, our npm script that invokes
tsc --noEmit
fails with the following:Problem description:
It can't find
pretty-format
. I do seepretty-format
in mypackage-lock.json
, version 25.5.0. It might be the "corresponding type declarations" that the error is flagging? I notice this line was added in #690, which finagles the type definitions a bit, though I don't totally understand the PR.It could be that I'm supposed to update my package-json with a new dependency of some sort?
The text was updated successfully, but these errors were encountered: