Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a declaration file for module 'debug' #86

Open
eKazim opened this issue May 17, 2024 · 0 comments
Open

Could not find a declaration file for module 'debug' #86

eKazim opened this issue May 17, 2024 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@eKazim
Copy link

eKazim commented May 17, 2024

Environment

  • wyw-in-js version: 0.5.3
  • custom processor: linaria
  • Bundler (+ version): TS 5.4.5
  • Node.js version: 20.10.0
  • OS: Windows 10

Description

I'm compiling es-modules by Typescript (tsc) in project with React-components which uses linaria:

But I have an error when I try to compile:

../../node_modules/@wyw-in-js/shared/types/logger.d.ts:1:26 - error TS7016: Could not find a declaration file for module 'debug'. 'C://myProject/node_modules/debug/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`

1 import genericDebug from 'debug';
                           ~~~~~~~

It seems that @wyw-in-js/shared need to add @types/debug to its dependencies in package.json?

For now I fix the issue by npm i -D @types/debug, but I don't think I should have to install the types in my consumer project since I do not directly use package 'debug'.

@eKazim eKazim added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels May 17, 2024
@github-actions github-actions bot removed the needs: triage 🏷 Issue needs to be checked and prioritized label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

1 participant