Skip to content

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

Closed

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions