Skip to content

rc.2 doesn't preserve "yarn" as the preferred package manager during cli update #10225

@IgorMinar

Description

@IgorMinar

Versions

Angular CLI: 6.0.0-rc.2
Node: 8.9.4
OS: darwin x64
Angular: 6.0.0-rc.3
... animations, common, compiler, compiler-cli, core, elements
... forms, http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cdk: 6.0.0-rc.1
@angular/cli: 6.0.0-rc.2
@angular/material: 6.0.0-rc.1

Repro steps

  • get a yarn based 1.7.3 project
  • update cli to 6.rc2
  • ng update @angular/cli --migrate-only --from=1.7.3

Observed behavior

angular.json doesn't contain "yarn" as a preferred package manager setting

Desired behavior

yarn preference should be preserved during update

Mention any other details that might be useful (optional)

once this goes wrong, any subsequent ng updates e.g. ng update @angular/material work incorrectly because they use npm rather than yarn.

Workaround

Manually edit angular.json to add the config option:

{
  "version": 1,
  "cli": {
    "packageManager": "yarn"
  },
  ...

One can also set user-wide setting via:

ng config --global cli.packageManager '"yarn"'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions