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 'kareem'. #14497

Closed
1 task done
Capta1nRaj opened this issue Apr 3, 2024 · 6 comments
Closed
1 task done

Could not find a declaration file for module 'kareem'. #14497

Capta1nRaj opened this issue Apr 3, 2024 · 6 comments
Labels
help wanted help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Milestone

Comments

@Capta1nRaj
Copy link

Capta1nRaj commented Apr 3, 2024

Prerequisites

  • I have written a descriptive issue title

Mongoose version

8.3.0

Node.js version

20.x

MongoDB version

6.0.4

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

11 version 23H2

Issue

This was my learning project connect2mongodb. I don't need to create files to connect and disconnect to MongoDB, I just use it.

So, with each update on Mongoose, I update it. However, upon the release of version 8.3.0, whenever I try to npm run build this project, it shows me this error. I am using TypeScript as it was my learning project.

node_modules/mongoose/types/index.d.ts:30:27 - error TS7016: Could not find a declaration file for module 'kareem'. 'E:/Study/Projects/Personal Projects/My Modules/connect2mongodb/node_modules/kareem/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/kareem if it exists or add a new declaration (.d.ts) file containing declare module 'kareem';

30 import Kareem = require('kareem');
~~~~~~~~

node_modules/mongoose/types/middlewares.d.ts:2:27 - error TS7016: Could not find a declaration file for module 'kareem'. 'E:/Study/Projects/Personal Projects/My Modules/connect2mongodb/node_modules/kareem/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/kareem if it exists or add a new declaration (.d.ts) file containing declare module 'kareem';

2 import Kareem = require('kareem');

It was working fine till 8.2.4.

@Capta1nRaj Capta1nRaj added help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary help wanted labels Apr 3, 2024
@cope
Copy link

cope commented Apr 4, 2024

Same here.

Reverting back to 8.2.4 fixes it.

@SergeyYahdzhyiev
Copy link

Same here.

Reverting back to 8.2.4 fixes it.

Thanks for the tip.

Ran into the same issue.

@Xirynx
Copy link

Xirynx commented Apr 5, 2024

Same issue. Also had to revert back to 8.2.4

@vkarpov15 vkarpov15 added this to the 8.3.1 milestone Apr 5, 2024
vkarpov15 added a commit that referenced this issue Apr 7, 2024
fix: update kareem -> 2.6.3 for index.d.ts
@vkarpov15
Copy link
Collaborator

Fixed by #14508

@cope
Copy link

cope commented Apr 9, 2024

@vkarpov15 thank you for taking care!

@Capta1nRaj
Copy link
Author

Fixed by #14508

Thanks @vkarpov15 for the immediate fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Projects
None yet
Development

No branches or pull requests

5 participants