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

Missing @types/debug into package.json (devDependencies) #259

Closed
LsKoder opened this issue Nov 10, 2023 · 2 comments · Fixed by #260
Closed

Missing @types/debug into package.json (devDependencies) #259

LsKoder opened this issue Nov 10, 2023 · 2 comments · Fixed by #260
Assignees
Labels

Comments

@LsKoder
Copy link

LsKoder commented Nov 10, 2023

Error Description:

Library debug is specified into dependencies, but related @types/debug is missing.
Transpiler produces the following error at build time:

node_modules/ibm-cloud-sdk-core/es/lib/get-new-logger.d.ts:16:26 - error TS7016: Could not find a declaration file for module 'debug'. '/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';`
16 import { Debugger } from 'debug';

Solution:

Add "@types/debug": "^4.1.12" into devDependencies

"debug": "^4.1.1",

Workaround (Tested):

Add explicit "@types/debug": "^4.1.12" into the main project, in addition to "node-sdk-core".

Thanks

@padamstx
Copy link
Member

padamstx commented Nov 10, 2023

@LsKoder what, specifically, were you building when you encountered this error? Just want to make sure I have the complete view of the problem and solution. Thanks!

Edit: also, what version of the node core library are you using?

@padamstx padamstx self-assigned this Nov 10, 2023
padamstx added a commit that referenced this issue Nov 10, 2023
Fixes: #259

Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
padamstx added a commit that referenced this issue Nov 13, 2023
Fixes: #259

Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
@ibm-devx-sdk
Copy link

🎉 This issue has been resolved in version 4.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants