记一次nest.js安装mongoose的坑 痛定思痛。 2022-10-30 11:23 108阅读 0赞 [typegoose][] ## install ## npm i -s @typegoose/typegoose # install typegoose itself npm i -s mongoose # install peer-dependency mongoose npm i -D @types/mongoose # install all types for mongoose - this is required for typegoose to work in TypeScript 安装之后运行项目报如下错误,百思不得其解 ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3d6X2NvbWluZw_size_16_color_FFFFFF_t_70][] 由于mongoose版本的原因 [Update to work with mongoose 5.10.19 / 5.11][Update to work with mongoose 5.10.19 _ 5.11] npm install mongoose@5.10.19,降低版本即可 [typegoose]: https://typegoose.github.io/typegoose/ [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3d6X2NvbWluZw_size_16_color_FFFFFF_t_70]: /images/20221024/d137297833144b22914868357f4ccb99.png [Update to work with mongoose 5.10.19 _ 5.11]: https://github.com/typegoose/typegoose/issues/432
还没有评论,来说两句吧...