Skip to content

Handling dependencies of dependencies and their resolution #2763

@victornoel

Description

@victornoel

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

Bug

What is the current behavior?

This has been made visible via angular/angular-cli#4611 and angular/angular-cli#4787.

Basically, there are some dependencies to:

  • "@angular/cli": "1.0.0-beta.32.3" (as a devDependencies)
    • which depends on "@angular/compiler" ">=2.3.1 <5.0.0"
  • "@angular/compiler": "4.0.0-beta.8" (as a dependencies)

The problem is that yarn resolves @angular/cli dependency to "@angular/compiler" "2.4.8" which creates problems with angular-cli.

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

See angular/angular-cli#4787 (comment):

sudo yarn global add @angular/cli
ng set --global packageManager=yarn
ng new MyYarnApp -ng4
cd MyYarnApp
ng serve or ng build

What is the expected behavior?

I would either expect yarn to:

  • consider that since "@angular/compiler": "4.0.0-beta.8" is explicitly expressed in the package.json, it should use it also for dependencies dependencies if it matches (which is the case here).
  • at least give me a way to force dependencies dependencies versions if I need to.

Please mention your node.js, yarn and operating system version.

yarn 0.20.3, node 6.10.0, latest archlinux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions