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.

Regression: Could not find a declaration file for module 'qunit-dom' on v1.6.0-beta.1

See original GitHub issue
  1. Clone this repo: https://github.com/johanrd/qunit-dom-typescript-reproduction
  2. Run tsc, and experience the following typescript errors:
machine:qunit-dom-typescript-reproduction user$ tsc
tests/acceptance/application-test.ts:13:12 - error TS2339: Property 'dom' does not exist on type 'Assert'.

13     assert.dom('#ember-welcome-page-id-selector').exists();
              ~~~

tests/test-helper.ts:5:23 - error TS7016: Could not find a declaration file for module 'qunit-dom'. '…/qunit-dom-typescript-reproduction/node_modules/qunit-dom/index.js' implicitly has an 'any' type.
  Try `npm install @types/qunit-dom` if it exists or add a new declaration (.d.ts) file containing `declare module 'qunit-dom';`

5 import { setup } from 'qunit-dom';

yarn add @types/qunit-dom does not make any difference (as expected from deprecation).

Have I missed something from the migration guide and/or readme? Or is it an actual regression on v1.6.0-beta.1? thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
scalvertcommented, Oct 28, 2020

OK, that’s not going to be sufficient to test this, as qunit-dom is built and rolled up before it’s published. Try this:

  • cd qunit-dom-typescript-reproduction
  • yarn add https://github.com/simplabs/qunit-dom#e654d0e1c10fdb2b96f0255775ad66a2c0b24193 --dev
  • cd node_modules/qunit-dom (this will install qunit-dom’s dependencies and build/rollup the package
  • cd ../.. && yarn build (running yarn build is more appropriate than running tsc since it runs Ember’s build, which in turn will compile typescript)
0reactions
scalvertcommented, Oct 28, 2020

Awesome. Thanks for testing this out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find a declaration file for module 'module-name ...
Here are two other solutions. When a module is not yours - try to install types from @types : npm install -D @types/module-name....
Read more >
[BUG] Could not find a declaration file for module '@playwright ...
This breaks the git-hook and I cannot find an easy way out. Work around. I've found one work around giving up all TS...
Read more >
How to fix error TS7016: Could not find a declaration file for ...
Try `npm install @types/XYZ` if it exists or add a new declaration (.d.ts) file containing `declare module 'XYZ';. If XYZ is a direct...
Read more >
qunit-dom | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Error: Could not find a declaration file for module - YouTube
Fix error: Could not find a declaration file for module ... implicitly has an 'any' type.Try npm install library-name if it exists or...
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