-
Notifications
You must be signed in to change notification settings - Fork 65
(BUG) Cannot find module 'mongoose' or its corresponding type declarations. #87
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
Comments
Bumping here as I ran into the issue as well, is this project still maintained? It seems mongoose should either be added to the package dependencies or the import removed |
Thanks for reporting! Seems a shame to move from devDep to dep for a compile-time thing, but I don't know of a better solution. Should be fixed in I don't have much time these days, but intend to continue reviewing PRs. |
hah, of course you can't have it both ways. I found that |
@lorensr I'm also having problems upgrading to the latest patch release, it broke my TypeScript build because it's trying to install a higher version of Mongoose. Since Mongoose isn't actually used in the implementation code, I'm not sure why it was added to dependencies. I can see it being used in tests, but those files aren't included into the build so I'm not sure why this was considered a "bug". It seems to be unrelated to the packaged code from |
Makes sense, sorry about that! Moved it to a peer dep in |
When trying to compile typescript, I get this error:
Cannot find module 'mongoose' or its corresponding type declarations.
I tried rm -rf node_modules, package-lock.json, as well clean installing with yarn to see if that fixed it but no luck.
For now, I am just adding mongoose as a dev dep in my root package.json but I'd like if there is a solution for this.
I'm using the latest version (0.5.2) and tried downgrading as well. Still no luck.
The text was updated successfully, but these errors were encountered: