Type declaration not found
See original GitHub issueImporting this package in a typescript project results in the error:
Could not find a declaration file for module ‘web-vitals’. ‘<snip>/node_modules/web-vitals/dist/web-vitals.min.js’ implicitly has an ‘any’ type. Try
npm install @types/web-vitals
if it exists or add a new declaration (.d.ts) file containingdeclare module 'web-vitals';
ts(7016)
I see the lib is written in typescript so I’m assuming this is a misconfiguration of the build, not that types are hosted in an types package
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'module-name ...
When a module is not yours - try to install types from @types : ... such index.d.ts that'll contain all the missing declaration...
Read more >Could not find declaration file for module 'X' Error | bobbyhadz
The error "Could not find a declaration file for module" occurs when TypeScript cannot find the type declaration for a module. To solve...
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. · declare module 'XYZ';. Lastly, you also need to add...
Read more >[TypeScript] Could not find a declaration file for module 'node ...
When using apollo-env through apollo-server, I get the following error during TypeScript builds: ...
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 Free
Top Related Reddit Thread
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
Updated and import’s working as expected, thanks for the quick turnaround @philipwalton
@deasems I just released
v0.2.1
, which should fix this. Please give it a try and let me know if you’re still having issues.