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

> styled-components@3.4.10 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/slate-icon-blockquote@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-blockquote@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-codeblock@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-codeblock@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-code@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-code@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-fontbgcolor@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-fontbgcolor@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-bold@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-bold@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-clean@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-clean@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-header@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-header@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-hr@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-hr@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-image@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-image@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-fontcolor@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-fontcolor@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-link@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-link@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-italic@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-italic@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-indent@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-list@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-list@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-redo@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-edit-blockquote@0.5.0 requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-edit-list@0.11.3 requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-prism@0.5.0 requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-prism@0.4.0 requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-sidebar@1.5.0 requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN slate-sidebar@1.5.0 requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN slate-sidebar@1.5.0 requires a peer of slate-edit-blockquote@^0.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-strikethrough@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-strikethrough@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-toolbar@1.5.0 requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN slate-toolbar@1.5.0 requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN slate-toolbar@1.5.0 requires a peer of @canner/slate-icon-emoji@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN slate-trailing-block@0.5.0 requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-table@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-table@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-underline@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-underline@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-video@1.5.0 requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-icon-shared@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-hovertable@0.3.0 requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-hovertable@0.3.0 requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-modular-table@1.5.0 requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-modular-table@1.5.0 requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/slate-editor-html@1.5.0 requires a peer of @canner/slate-constant@>=^1.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN slate-prism@0.4.0 requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN slatetest@1.0.0 No description
npm WARN slatetest@1.0.0 No repository field.

+ react-dom@16.5.2
+ slate-react@0.12.11
+ canner-slate-editor@1.5.4
+ immutable@3.8.2
+ react@16.5.2
+ slate@0.33.8
+ antd@3.10.1
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:

canner-slate-editor@1.5.4 depends on @canner/slate-helper-block-list@^1.5.0, but slate-toolbar@1.5.0 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/slate-icon-shared@1.5.0 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