Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document peer dependencies during npm install #201

Closed
dongyuhappy opened this issue Nov 18, 2016 · 7 comments
Closed

document peer dependencies during npm install #201

dongyuhappy opened this issue Nov 18, 2016 · 7 comments
Assignees
Milestone

Comments

@dongyuhappy
Copy link

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.

@giladgray
Copy link
Contributor

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.

@giladgray giladgray changed the title install error document peer dependencies during npm install Nov 18, 2016
@dongyuhappy
Copy link
Author

then i got this error

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

@adidahiya
Copy link
Contributor

adidahiya commented Nov 18, 2016

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

@vyorkin
Copy link

vyorkin commented Dec 10, 2016

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.

@Swivelgames
Copy link

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...

@adidahiya
Copy link
Contributor

@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.

@Swivelgames
Copy link

@adidahiya Thanks for the update!

@adidahiya adidahiya mentioned this issue Dec 1, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants