Could not find a declaration file for module 'quagga'.
See original GitHub issueI want to add quagga to React and when I import it with import Quagga from "quagga";
I get:
Could not find a declaration file for module 'quagga'. '___path___/node_modules/quagga/lib/quagga.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/quagga` if it exists or add a new declaration (.d.ts) file containing `declare module 'quagga';`ts(7016)
npm i --save-dev @types/quagga
is not possible because ‘@types/quagga@latest’ is not in the npm registry.
``declare module ‘quagga’;` is not possible in vanilla JS as I know.
Issue Analytics
- State:
- Created 2 years ago
- Comments:19
Top Results From Across the Web
Could not find a declaration file for module 'module-name ...
In order for this to work, I had to make declare module '...' the first line of code in the module.d.ts file, and...
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...
Read more >Could not find declaration file for module 'X' Error | bobbyhadz
The error "Could not find declaration file for module" occurs when TypeScript cannot find the type declaration for a module. To solve the...
Read more >Could not find a declaration file for module 'mongodb ... - Reddit
Could not find a declaration file for module 'mongodb', despite library saying the types are included. I'm using NextJS and Typescript, with ...
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did not know this library have a new version in https://github.com/ericblade/quagga2 with quagga2 work for me thanks!
I have the same error, I use React with Typescript. And I fixed it with the ignore tag :
// @ts-ignore
import Quagga from 'quagga';