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

Mismatched peer dependencies #51

Open
3 tasks
elliottsj opened this issue Oct 17, 2018 · 1 comment
Open
3 tasks

Mismatched peer dependencies #51

elliottsj opened this issue Oct 17, 2018 · 1 comment

Comments

@elliottsj
Copy link

When installing canner-slate-editor, there are mismatched peer dependencies:

$ mkdir test
$ cd test
$ npm init -y
$ npm install --save antd@^3.10.1 canner-slate-editor@^1.5.4 immutable@^3.8.2 react@^16.5.2 react-dom@^16.5.2 slate@^0.33.8 slate-react@^0.12.11

> [email protected] postinstall /Users/spencerelliott/Dev/elliottsj/slatetest/node_modules/styled-components
> node ./scripts/postinstall.js || exit 0

Use styled-components at work? Consider supporting our development efforts at opencollective.com/styled-components
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate-edit-blockquote@^0.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-icon-emoji@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 358 packages from 241 contributors and audited 6096 packages in 17.073s
found 0 vulnerabilities

It is not possible to avoid these warnings because many of these peer dependencies have no version which satisfies all version constraints.

For example:

[email protected] depends on @canner/slate-helper-block-list@^1.5.0, but [email protected] depends on a peer of @canner/slate-helper-block-list@^0.1.12. There is no version that satisfies both constraints ^1.5.0 and ^0.1.12.

Another problem is that many sub-packages are specifying their peer dependencies using an invalid syntax, e.g. https://github.com/Canner/canner-slate-editor/blob/0330dc6000a3e31ff6aa7a46309c54eddb6c4acf/packages/slate-icons/shared/package.json#L12

>=^1.0.6 is not a valid semver constraint, so npm raises the error

npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.

Suggested fixes

  • Fix all invalid semver constraints, e.g. change >=^1.0.6 to >=1.0.6.
  • Loosen peer dependency constraints so that a valid version exists for every combination. e.g. change slate-toolbar's peer dep on @canner/slate-helper-block-list from ^0.1.12 to >=0.1.12.
  • Add a CI build step to prevent this from occurring in the future, e.g. Travis CI or CircleCI. Run the command npm ls as part of the build, which produces an error if peer dependencies are mismatched.
@bleucitron
Copy link

bleucitron commented Dec 12, 2018

This also happens when using @canner/slate-md-plugin with bare Slate.

I had to manually install

  • @canner/slate-helper-block-list
  • @canner/slate-helper-mark-removeall
  • slate-schema-violations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants