kpfromer / nestjs-typegoose

Typegoose with NestJS
https://kpfromer.github.io/nestjs-typegoose/
MIT License
291 stars 71 forks source link

Can not install module #460

Open alisherafat01 opened 2 years ago

alisherafat01 commented 2 years ago

npm install --save nestjs-typegoose results error: Could not resolve dependency: peer @nestjs/common@"^6.10.1 || ^7.0.0" from nestjs-typegoose@7.1.38

inside package.json i'm using"@nestjs/common": "^8.0.0"

SergioArrighi commented 2 years ago

same here, looks like this module is not compatible with latest version of nest itself

evtifiev commented 2 years ago

@SergioArrighi @alisherafat01 Run npm install --save nestjs-typegoose --legacy-peer-deps. This solved my issue.

kamalkech commented 2 years ago

@evtifiev but that s not good, i guess the team stop to maintain this package

ilaipi commented 2 years ago

@SergioArrighi @alisherafat01 Run npm install --save nestjs-typegoose --legacy-peer-deps. This solved my issue.

got the error after this.

Error: Cannot find module 'webpack'

to fix:

rm -fr package-lock.json node_modules
npm install

try npm install --save --force nestjs-typegoose works for me.

MelkorRUS commented 1 year ago

It's not fixed... I'm used last command (it is upper), but it's not work good.

This is a npm resolution error report:

While resolving: top-api@0.0.1 Found: @nestjs/common@9.4.0 node_modules/@nestjs/common @nestjs/common@"^9.0.0" from the root project

Could not resolve dependency: peer @nestjs/common@"^6.10.1 || ^7.0.0" from nestjs-typegoose@7.1.38 node_modules/nestjs-typegoose nestjs-typegoose@"^7.1.38" from the root project

Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

Why it's not fix?

My package.json:

"dependencies": { "@nestjs/common": "^9.0.0", "@nestjs/config": "^2.3.1", "@nestjs/core": "^9.0.0", "@nestjs/platform-express": "^9.0.0", "@typegoose/typegoose": "^11.1.0", "mongoose": "^7.1.0", "nestjs-typegoose": "^7.1.38", "reflect-metadata": "^0.1.13", "rxjs": "^7.2.0" }, "devDependencies": { "@nestjs/cli": "^9.0.0", "@nestjs/schematics": "^9.0.0", "@nestjs/testing": "^9.0.0", "@types/express": "^4.17.13", "@types/jest": "29.5.0", "@types/node": "18.15.11", "@types/supertest": "^2.0.11", "jest": "29.5.0", "prettier": "^2.3.2", "source-map-support": "^0.5.20", "supertest": "^6.1.3", "ts-jest": "29.0.5", "ts-loader": "^9.2.3", "ts-node": "^10.0.0", "tsconfig-paths": "4.2.0", "tslint": "^6.1.3", "typescript": "^4.7.4" },