2016-07-13 2 views
3

При попытке npm install Я получаю эти ошибки. Не могу понять, почему он не работает, если я использую последнюю версию React.Пакет [email protected] не удовлетворяет требованиям равных зависимостей своих братьев и сестер

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants [email protected]^15.2.1 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.5 npm ERR! peerinvalid Peer [email protected] wants [email protected]^15.2.1 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.7 || ^15.0.0-0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0-0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0-0 npm ERR! peerinvalid Peer [email protected] wants [email protected]~15.2.0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0-0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0 npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 || ^15.0.0-rc.1

ответ

3

Это потому, что другие пакеты в вашем проекте хочет более низкую версию Реагировать, как 15,0, но не 15,2. Вы можете узнать больше о peerDependencies здесь https://nodejs.org/en/blog/npm/peer-dependencies/#the-solution-peer-dependencies и здесь https://docs.npmjs.com/files/package.json#peerdependencies

Решение проблемы, не обновляйте версию React до обновления других библиотек.

7

Вы также можете обновить npm до версии 3. Новая версия гарантирует, что у вас нет этой проблемы.