cannot use typescript definitions from npm package
See original GitHub issueDescribe the bug install the package by npm, nothing about typescript definitions.
To Reproduce Steps to reproduce the behavior:
npm i html5-qrcode
import Html5Qrcode from 'html5-qrcode'
- See error about typescript
Expected behavior
Generate the typescript definitions please.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Typescript does not resolve definition file for npm package
The problem you have is due to your tsconfig.json tries to explicitly include the typing file. npm package typings ...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
We can now simply use npm and the Typescript compiler will implicitly take any type definitions installed inside the node_modules/@types folder ...
Read more >types/jest - npm
This package contains type definitions for Jest (https://jestjs.io/). Details. Files were exported from https://github.com/DefinitelyTyped/ ...
Read more >Documentation - Modules - TypeScript
Modules are executed within their own scope, not in the global scope; this means that variables, functions, classes, etc. declared in a module...
Read more >How to use TypeScript in Node.js - Execute Program
ts test.ts:1:14 - error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i ...
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
@EduardMcfly please send a PR if you have a working solution.
This should have been fixed in latest version -
v2.1.0
Please reopen if this is still an issue.
@EduardMcfly Thanks the solution was greatly inspired from your work.