Blueprint: document peer dependencies during npm install

Created on 18 Nov 2016  ยท  7Comments  ยท  Source: palantir/blueprint

when i run npm install --save @blueprintjs/core to install .I got this error

โ”‚ โ”œโ”€โ”€ UNMET PEER DEPENDENCY react@^15.0.0 || ^0.14.0
โ”‚ โ””โ”€โ”€ [email protected]
โ”œโ”€โ”€ UNMET DEPENDENCY react@^15.3.2
โ”œโ”€โ”€ UNMET PEER DEPENDENCY react-addons-css-transition-group@^15.0.1 || ^0.14
โ””โ”€โ”€ UNMET DEPENDENCY react-dom@^15.3.2

npm WARN @blueprintjs/[email protected] requires a peer of react@^15.0.1 || ^0.14 but none was installed.
npm WARN @blueprintjs/[email protected] requires a peer of react-addons-css-transition-group@^15.0.1 || ^0.14 but none was installed.
npm WARN @blueprintjs/[email protected] requires a peer of react-dom@^15.0.1 || ^0.14 but none was installed.
npm WARN [email protected] requires a peer of react@^15.0.0 || ^0.14.0 but none was installed.

documentation P3

Most helpful comment

@Swivelgames If you're using React 16, we're currently in an awkward in-between state where we need react-addons-css-transition group for pre-16 support, hence the peer dep warnings. They should be safe to ignore for now. Follow #866 for more updates.

All 7 comments

this is expected behavior--you have to install React alongside @blueprintjs/core. we chose to use peer dependencies so you can choose the version of React instead of it being imposed upon you by our library.

npm install those three libraries and you'll be good to go!

we'll add this to the documentation.

then i got this error

NMET PEER DEPENDENCY react-addons-css-transition-group@^15.0.1 || ^0.14

Sure, we could add a _very brief_ note to the documentation but (1) honestly I don't see how NPM's _inline console messages_ could be any more clear in this case and (2) people will miss our docs note in the sea of docs. The first few google results for "unmet peer dependency" also tell you what to do. http://stackoverflow.com/questions/35738346/how-to-solve-npm-unmet-peer-dependency

btw I've just spent some time debugging issue with missing @types/tether dependency, it isn't specified in @blueprintjs/core, I guess it should be. Please correct me if I've missed smth.

There appears to be an actual issue here.

{
  "name": "reactdemo",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-scripts": "1.0.14"
  },
  "dependencies": {
    "react": "^16.0.0",
    "react-addons-css-transition-group": "^15.6.2",
    "react-dom": "^16.0.0",
    "react-transition-group": "^1.2.1",
    "@blueprintjs/core": "^1.32.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

Running npm i results in the following:

[email protected]
โ”œโ”€โ”ฌ @blueprintjs/[email protected]
โ”‚ โ”œโ”€โ”€ @types/[email protected]
โ”‚ โ”œโ”€โ”€ @types/[email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ UNMET PEER DEPENDENCY react@^15.0.0 || ^0.14.0
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ””โ”€โ”€ [email protected]
โ”œโ”€โ”ฌ UNMET PEER DEPENDENCY [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”œโ”€โ”€ [email protected]
...truncated...

@Swivelgames If you're using React 16, we're currently in an awkward in-between state where we need react-addons-css-transition group for pre-16 support, hence the peer dep warnings. They should be safe to ignore for now. Follow #866 for more updates.

@adidahiya Thanks for the update!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scottfr picture scottfr  ยท  3Comments

tgreenwatts picture tgreenwatts  ยท  3Comments

ernestofreyreg picture ernestofreyreg  ยท  3Comments

westrem picture westrem  ยท  3Comments

Goddak picture Goddak  ยท  3Comments