Skip to content

Yarn workspace with packages dependencies in different versions is conflicting #6859

@renatho

Description

@renatho

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I created a new project with 1 package like a workspace. I installed in the root the lodash@4.17.11 and in my package the loadsh@3.10.1. When I run the root, importing my package like dependency, the error log is: "export 'default' (imported as '_') was not found in 'lodash'
If I install the same version in both, it works. But I want each package with its dependencies (maybe I will want to update a lib in my packages, one at a time)

If the current behavior is a bug, please provide the steps to reproduce.

  1. Create a new project with one workspace
  2. In the root, install the lodash@4.17.11
  3. In the package, install the loadsh@3.10.1
  4. Import the lodash in the package and in the root code and console.log in both
  5. Import the package in the root
  6. Run this code (the root) and see the bug

What is the expected behavior?
Each package should work with its own versions dependencies.

Please mention your node.js, yarn and operating system version.
Node v8.14.0, Yarn 1.12.3 and macOS Mojave

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions