React: npm: [email protected] does not satisfy its siblings' peerDependencies

Created on 21 May 2016  路  4Comments  路  Source: facebook/react

(bug)

What is the current behavior?

npm install react react-dom

Errs : "The package [email protected] does not satisfy its siblings' peerDependencies requirements!"

What is the expected behavior?

Run npm install react react-dom (from React documentation) without error

Repro

  1. mkdir repro;cd repro
  2. npm init # default / blank answers
  3. npm install react react-dom
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "react" "react-dom"
npm ERR! node v4.4.4
npm ERR! npm  v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@^15.1.0

Other Info

npm version
{ relay101: '1.0.0',
  npm: '2.15.1',
  ares: '1.10.1-DEV',
  http_parser: '2.5.2',
  icu: '56.1',
  modules: '46',
  node: '4.4.4',
  openssl: '1.0.2h',
  uv: '1.8.0',
  v8: '4.5.103.35',
  zlib: '1.2.8' }

Most helpful comment

I recommend to switch to npm@3, it has much less annoying warning. If you look at error closely you'll see why it fails:

npm ERR! peerinvalid Peer [email protected] wants react@^15.1.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.1.0

You have half of React packages at 15.0.2 and another half at 15.1.0. Please use a single version for all of them, and the problem will go away.

All 4 comments

I think this is probably because react-dom just got bumped to 15.1.0, whereas react hasn't yet been published to npm.

Edit: it was _just_ published

This is now resolved.

Sorry about that, small mistake while publishing. This should all be working now.

I recommend to switch to npm@3, it has much less annoying warning. If you look at error closely you'll see why it fails:

npm ERR! peerinvalid Peer [email protected] wants react@^15.1.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.1.0

You have half of React packages at 15.0.2 and another half at 15.1.0. Please use a single version for all of them, and the problem will go away.

Was this page helpful?
0 / 5 - 0 ratings