Skip to content

npm package "@ngxs-labs/attach-action" 0.1.3 has invalid peerDependency @ngxs/store >=5.0.0 #19

@jase88

Description

@jase88

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior

If installing @ngxs-labs/attach-action with npm7, you get an error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: @ngxs/[email protected]
npm ERR! node_modules/@ngxs/store
npm ERR!   @ngxs/store@"^3.7.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @ngxs/store@">=5.0.0" from @ngxs-labs/[email protected]
npm ERR! node_modules/@ngxs-labs/attach-action
npm ERR!   @ngxs-labs/attach-action@"^0.1.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

This is caused by the peerDeps in the current npm package:

"peerDependencies": {
    "@angular/core": ">=7.0.0",
    "@ngxs/store": ">=5.0.0",
    "rxjs": ">=6.5.2"
  },

Expected behavior

No error because of no existing peerDeps.
It would also require another npm release

Minimal reproduction of the problem with instructions

  • Step 1 Use Node 14 with npm 7
  • Step 2 Call npm i @ngxs-labs/attach-action --save without further flags

What is the motivation / use case for changing the behavior?

There are workarounds, for example using --legacy-peer-deps which ignores all peerDependencies, but it would be great to have it properly fixed

Environment


Libs:
- @angular/core version: X.Y.Z
- @ngxs/store version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 14 npm 7  
- Platform:  Windows

Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions