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.

Could not find a declaration file for module 'pino'

See original GitHub issue

Describe the bug A typings error after installing the WalletConnect types file into my app.

SDK Version (if relevant) “typescript”: “^4.7.3”, “@walletconnect/sign-client”: “^2.1.1”, “@walletconnect/types”: “^2.1.1”

To Reproduce To reproduce the behavior follow the instructions on https://docs.walletconnect.com/2.0/javascript/sign/installation

  1. Create a new application
  2. Install the above packages
  3. Initialize the launch code from the installation page
  4. Run script type check

Many errors of the same type appear:

node_modules/@walletconnect/types/dist/types/core/core.d.ts:1:24 - error TS7016: Could not find a declaration file for module 'pino'. '.../node_modules/pino/pino.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/pino` if it exists or add a new declaration (.d.ts) file containing `declare module 'pino';`

import { Logger } from "pino";

Expected behavior There are no typing errors.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
bkremcommented, Nov 14, 2022

Hi @ClementeSerrano,

This was just patched in 2.1.3 (see #1634 for context). Please let us know if you’re still experiencing this with the latest version.

The packages now also use pino@7 throughout, so the original issue here should now hopefully be resolved @smelnikov

0reactions
smelnikovcommented, Nov 17, 2022

Hi @ClementeSerrano,

This was just patched in 2.1.3 (see #1634 for context). Please let us know if you’re still experiencing this with the latest version.

The packages now also use pino@7 throughout, so the original issue here should now hopefully be resolved @smelnikov

Yup, 2.1.3 looks legitimate

Read more comments on GitHub >

github_iconTop 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 >
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 >
Fixing the TS7016 Error | Atomist Blog
4 Terrible Ways (and 4 Better Ways) to fix 'TS7016: Could not find declaration file' · Caveat: the compiler option --noEmitOnError makes ...
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 >

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