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

exports of user-event package.json are missing "types" entry #1024

Closed
gunters63 opened this issue Aug 6, 2022 · 1 comment · Fixed by #1029
Closed

exports of user-event package.json are missing "types" entry #1024

gunters63 opened this issue Aug 6, 2022 · 1 comment · Fixed by #1029
Labels

Comments

@gunters63
Copy link

gunters63 commented Aug 6, 2022

  • @testing-library/react version: 14.42
  • Typescript >= 4.7 set to "moduleResolution": "Node16" (so it processes package exports)

The new exports in package.json of user-event are missing the types entry.
This will break Typescript set to "moduleResolution": "Node16", in the tsconfig. It will just not find the types with this message:

image

Suggested solution:

  "exports": {
    ".": {
      "require": "./dist/cjs/index.js",
      "types": "./dist/types/index.d.ts",
      "default": "./dist/esm/index.js"
    },

After the manual fix the error goes away.

@gunters63 gunters63 changed the title exports of user-event package.json are missing "types"" exports of user-event package.json are missing "types" entry Aug 6, 2022
@eps1lon eps1lon transferred this issue from testing-library/react-testing-library Aug 6, 2022
@github-actions
Copy link

github-actions bot commented Aug 9, 2022

🎉 This issue has been resolved in version 14.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant