Skip to content

tslib listed as peer and production dependency in memfs package.jsonΒ #1241

@shawnmcknight

Description

@shawnmcknight

I'm in the process of updating some dependencies and memfs is a transitive dependency on one of my project's dependencies. When I updated my dependency, the current version of memfs (4.56.10) was added and pnpm started reporting peer dependency warnings due to tslib.

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

apps/app.admin
└─┬ @rspack/cli 1.7.5
  └─┬ @rspack/dev-server 1.1.5
    └─┬ webpack-dev-server 5.2.2
      └─┬ webpack-dev-middleware 7.4.2
        └─┬ memfs 4.56.10
          β”œβ”€β”€ βœ• missing peer tslib@2
<snip>
Peer dependencies that should be installed:
  tslib@">=2.0.0 <3.0.0-0"

Looking at the package.json for the memfs package it looks a little off. tslib is listed as a peer dependency with a version spec of "2" and also as a production dependency with a version spec of "^2.0.0".

It's possible that pnpm shouldn't report an unmet peer when the dependency specifying the peer also specifies it as a dependency. However, it seems unintentional for memfs to have tslib as both a dependency and a peer dependency as I can't think of a reason why you would need it to be both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions