0

Нахожусь на стадии изучения бекенда на примере NestJS. Дошел до момента работы с базами данных. Пытался установить nestjs-typegoose. Набрал в консоли npm i nestjs-typegoose и получил следующую ошибку.

Could not resolve dependency:
peer @nestjs/common@"^6.10.1 || ^7.0.0" from [email protected]
node_modules/nestjs-typegoose
  nestjs-typegoose@"*" 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.

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "current": {
    "name": "@nestjs/common",
    "version": "8.4.5",
    "whileInstalling": {
      "name": "top-api",
      "version": "0.0.1",
      "path": "/home/dzmitrylukashenka/projects/nestjs/top-api"
    },
    "location": "node_modules/@nestjs/common",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "prod",
        "name": "@nestjs/common",
        "spec": "^8.4.5",
        "from": {
          "location": "/home/dzmitrylukashenka/projects/nestjs/top-api"
        }
      }
    ]
  },
  "currentEdge": {
    "type": "prod",
    "name": "@nestjs/common",
    "spec": "^8.4.5",
    "from": {
      "location": "/home/dzmitrylukashenka/projects/nestjs/top-api"
    }
  },
  "edge": {
    "type": "peer",
    "name": "@nestjs/common",
    "spec": "^6.10.1 || ^7.0.0",
    "error": "INVALID",
    "from": {
      "name": "nestjs-typegoose",
      "version": "7.1.38",
      "whileInstalling": {
        "name": "top-api",
        "version": "0.0.1",
        "path": "/home/dzmitrylukashenka/projects/nestjs/top-api"
      },
      "location": "node_modules/nestjs-typegoose",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "prod",
          "name": "nestjs-typegoose",
          "spec": "*",
          "from": {
            "location": "/home/dzmitrylukashenka/projects/nestjs/top-api"
          }
        }
      ]
    }
  },
  "strictPeerDeps": false,
  "force": false
}

1 ответ 1

0

Добавил в конце --legacy-peer-deps. Получилось так

npm install --save nestjs-typegoose --legacy-peer-deps

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.