Skip to content

Wrapped -> non-wrapped dependencies not available at runtime #4

@mattnathan

Description

@mattnathan

I'm trying out your node rules for our project and have hit what appears to be a missing use case surrounding combinations of wrapped and unwrapped packages.

My specific issue is with an app that depends on both grpc and @grpc/proto-loader.

grpc@^1.19.0 depends on protobufjs@^5.0.3 and @grpc/proto-loader@^0.4.0 depends on protobufjs@^6.8.6. When running yarn install manually these conflicts are correctly handled by making protobufjs@^5.0.3 a top level node_modules package and wrapping protobufjs@^6.8.6 inside @grpc/proto-loader/node_modules. The dependencies of protobufjs@^6.8.6 (and 5.0.3) get placed in the root node_modules.

This all results in a directory structure like this:

/package.json
/node_modules/grpc/... @1.19.0 // has node_modules but no protobufjs in there
/node_modules/protobufjs/... @5.0.3 // no node_modules
/node_modules/@grpc/proto-loader/... @0.4.0
/node_modules/@grpc/proto-loader/node_modules/protobufjs/... @6.8.6 // no node_modules
/node_modules/... // both protobufjs deps for 5.0.3 and 6.8.6

It appears that the dependency installation function isn't processing non-wrapped dependencies of wrapped dependencies.

I've created a repo that shows the issue: https://github.com/vanti-public/issue-happy-wrapped

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions