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

index.d.ts is not a module #819

Closed
mohetti opened this issue Dec 31, 2021 · 2 comments · Fixed by #821
Closed

index.d.ts is not a module #819

mohetti opened this issue Dec 31, 2021 · 2 comments · Fixed by #821

Comments

@mohetti
Copy link

mohetti commented Dec 31, 2021

  • @testing-library/user-event version: 14.0.0-beta.4

  • Testing Framework and version:

  • jest: 27.4.4

  • ts-jest: 27.1.1

  • DOM Environment:

  • jsdom: 27.4.4

What you did:
npm i --save-dev @testing-library/[email protected]

What happened:
Received the following error-message:
File '/home/<name>/Projects/battleship/node_modules/@testing-library/user-event/dist/index.d.ts' is not a module.

Reproduction repository:
You can recreate the problem with the following steps:

  • git clone [email protected]:mohetti/jestBattleship.git
  • npm install
  • open ./src/Components/SingleBoard/index.test.ts
  • At this point, the latest user-event version is installed and the tests run fine. To reproduce the error:
  • npm i --save-dev @testing-library/[email protected]
  • after installation and with index.test.ts open, the error message appears

Thank you for looking into it.

@ph-fritsche
Copy link
Member

Thanks for the report ❤️

I have no clue how I tricked myself into thinking that this export included a working declaration.

@github-actions
Copy link

🎉 This issue has been resolved in version 14.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ph-fritsche ph-fritsche added this to the userEvent v14 milestone Dec 31, 2021
@ph-fritsche ph-fritsche linked a pull request Dec 31, 2021 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants