gribnoysup / react-yandex-maps

Yandex Maps API bindings for React
MIT License
329 stars 116 forks source link

Ошибка при установке react-yandex-maps с 17 версией react #301

Open porot07 opened 3 years ago

porot07 commented 3 years ago

Приветствую Вас создатели обертки Яндекс.Карты под react - столкнулся с сией проблемой сегодня, что можете посоветовать? Я как понимаю все дело в том что ваша библеотека без хуков? 16.3 версия реакта вроде у вас в зависимостяхъ

# npm resolution error report

2021-04-15T12:35:35.835Z

Found: react@17.0.2
node_modules/react
  peer react@"*" from @testing-library/react@11.2.5
  node_modules/@testing-library/react
    @testing-library/react@"^11.2.5" from the root project
  peer react@"17.0.2" from react-dom@17.0.2
  node_modules/react-dom
    peer react-dom@"*" from @testing-library/react@11.2.5
    node_modules/@testing-library/react
      @testing-library/react@"^11.2.5" from the root project
    peer react-dom@"^16.8.0 || 17.x" from react-simple-maps@2.3.0
    node_modules/react-simple-maps
      react-simple-maps@"^2.3.0" from the root project
    peer react-dom@">=16.0.0" from react-tooltip@4.2.17
    node_modules/react-tooltip
      react-tooltip@"^4.2.17" from the root project
    react-dom@"^17.0.2" from the root project
  peer react@"^16.8.3 || ^17" from react-redux@7.2.3
  node_modules/react-redux
    react-redux@"^7.2.3" from the root project
  peer react@">= 16" from react-scripts@4.0.3
  node_modules/react-scripts
    react-scripts@"4.0.3" from the root project
  peer react@"^16.8.0 || 17.x" from react-simple-maps@2.3.0
  node_modules/react-simple-maps
    react-simple-maps@"^2.3.0" from the root project
  peer react@">=16.0.0" from react-tooltip@4.2.17
  node_modules/react-tooltip
    react-tooltip@"^4.2.17" from the root project
  react@"^17.0.2" from the root project
  peer react@"^0.14.9 || ^15.x || ^16.x || ^17.x" from react-yandex-maps@4.6.0
  node_modules/react-yandex-maps
    react-yandex-maps@"*" from the root project

Could not resolve dependency:
peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from create-react-context@0.3.0
node_modules/react-yandex-maps/node_modules/create-react-context
  create-react-context@"^0.3.0" from react-yandex-maps@4.6.0
  node_modules/react-yandex-maps
    react-yandex-maps@"*" 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": "react",
    "version": "17.0.2",
    "location": "node_modules/react",
    "dependents": [
      {
        "type": "peer",
        "name": "react",
        "spec": "*",
        "from": {
          "name": "@testing-library/react",
          "version": "11.2.5",
          "location": "node_modules/@testing-library/react",
          "dependents": [
            {
              "type": "prod",
              "name": "@testing-library/react",
              "spec": "^11.2.5",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": "17.0.2",
        "from": {
          "name": "react-dom",
          "version": "17.0.2",
          "location": "node_modules/react-dom",
          "dependents": [
            {
              "type": "peer",
              "name": "react-dom",
              "spec": "*",
              "from": {
                "name": "@testing-library/react",
                "version": "11.2.5",
                "location": "node_modules/@testing-library/react",
                "dependents": [
                  {
                    "type": "prod",
                    "name": "@testing-library/react",
                    "spec": "^11.2.5",
                    "from": {
                      "location": "/home/дядя-фёдор/projects/тестовый проект"
                    }
                  }
                ]
              }
            },
            {
              "type": "peer",
              "name": "react-dom",
              "spec": "^16.8.0 || 17.x",
              "from": {
                "name": "react-simple-maps",
                "version": "2.3.0",
                "location": "node_modules/react-simple-maps",
                "dependents": [
                  {
                    "type": "prod",
                    "name": "react-simple-maps",
                    "spec": "^2.3.0",
                    "from": {
                      "location": "/home/дядя-фёдор/projects/тестовый проект"
                    }
                  }
                ]
              }
            },
            {
              "type": "peer",
              "name": "react-dom",
              "spec": ">=16.0.0",
              "from": {
                "name": "react-tooltip",
                "version": "4.2.17",
                "location": "node_modules/react-tooltip",
                "dependents": [
                  {
                    "type": "prod",
                    "name": "react-tooltip",
                    "spec": "^4.2.17",
                    "from": {
                      "location": "/home/дядя-фёдор/projects/тестовый проект"
                    }
                  }
                ]
              }
            },
            {
              "type": "prod",
              "name": "react-dom",
              "spec": "^17.0.2",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": "^16.8.3 || ^17",
        "from": {
          "name": "react-redux",
          "version": "7.2.3",
          "location": "node_modules/react-redux",
          "dependents": [
            {
              "type": "prod",
              "name": "react-redux",
              "spec": "^7.2.3",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": ">= 16",
        "from": {
          "name": "react-scripts",
          "version": "4.0.3",
          "location": "node_modules/react-scripts",
          "dependents": [
            {
              "type": "prod",
              "name": "react-scripts",
              "spec": "4.0.3",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": "^16.8.0 || 17.x",
        "from": {
          "name": "react-simple-maps",
          "version": "2.3.0",
          "location": "node_modules/react-simple-maps",
          "dependents": [
            {
              "type": "prod",
              "name": "react-simple-maps",
              "spec": "^2.3.0",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": ">=16.0.0",
        "from": {
          "name": "react-tooltip",
          "version": "4.2.17",
          "location": "node_modules/react-tooltip",
          "dependents": [
            {
              "type": "prod",
              "name": "react-tooltip",
              "spec": "^4.2.17",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      },
      {
        "type": "prod",
        "name": "react",
        "spec": "^17.0.2",
        "from": {
          "location": "/home/дядя-фёдор/projects/тестовый проект"
        }
      },
      {
        "type": "peer",
        "name": "react",
        "spec": "^0.14.9 || ^15.x || ^16.x || ^17.x",
        "from": {
          "name": "react-yandex-maps",
          "version": "4.6.0",
          "location": "node_modules/react-yandex-maps",
          "dependents": [
            {
              "type": "prod",
              "name": "react-yandex-maps",
              "spec": "*",
              "from": {
                "location": "/home/дядя-фёдор/projects/тестовый проект"
              }
            }
          ]
        }
      }
    ]
  },
  "currentEdge": null,
  "edge": {
    "type": "peer",
    "name": "react",
    "spec": "^0.14.0 || ^15.0.0 || ^16.0.0",
    "error": "INVALID",
    "from": {
      "name": "create-react-context",
      "version": "0.3.0",
      "location": "node_modules/react-yandex-maps/node_modules/create-react-context",
      "dependents": [
        {
          "type": "prod",
          "name": "create-react-context",
          "spec": "^0.3.0",
          "from": {
            "name": "react-yandex-maps",
            "version": "4.6.0",
            "location": "node_modules/react-yandex-maps",
            "dependents": [
              {
                "type": "prod",
                "name": "react-yandex-maps",
                "spec": "*",
                "from": {
                  "location": "/home/дядя-фёдор/projects/тестовый проект"
                }
              }
            ]
          }
        }
      ]
    }
  },
  "peerConflict": null,
  "strictPeerDeps": false,
  "force": false
}
suminas85 commented 3 years ago

"react": "^17.0.2", "react-yandex-maps": "^4.6.0", Завелось без проблем.

amankkg commented 3 years ago

Тут вот корень проблемы указан, дело в peer dependency пакета create-react-context (спойлер: автор его успешно забросил).

Could not resolve dependency:
peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from create-react-context@0.3.0
node_modules/react-yandex-maps/node_modules/create-react-context
  create-react-context@"^0.3.0" from react-yandex-maps@4.6.0
  node_modules/react-yandex-maps
    react-yandex-maps@"*" from the root project
happylolonly commented 3 years ago

Still not working?

topovik commented 3 years ago

Есть какие новости по данной проблеме?