Skip to content

Migration failed: tree.readText is not a function with ng update to next #23072

@ahnpnl

Description

@ahnpnl

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Nope

Description

When I run ng update @angular/cli@next @angular/core@next on a newly generated Angular 13 app, I see error in my command line.

🔬 Minimal Reproduction

  • Run ng new my-app --package-manager=yarn and wait until everything finishes
  • Do cd my-app and then run ng update @angular/cli@next @angular/core@next
  • After new dependencies are installed, migration step failed

🔥 Exception or Error


➜  my-app git:(master) ng update @angular/cli@next @angular/core@next
Using package manager: 'yarn'
Collecting installed dependencies...
Found 23 dependencies.
Fetching dependency metadata from registry...
    Updating package.json with dependency @angular-devkit/build-angular @ "14.0.0-next.12" (was "13.3.4")...
    Updating package.json with dependency @angular/cli @ "14.0.0-next.12" (was "13.3.4")...
    Updating package.json with dependency @angular/compiler-cli @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/animations @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/common @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/compiler @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/core @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/forms @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/platform-browser @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "14.0.0-next.15" (was "13.3.5")...
    Updating package.json with dependency @angular/router @ "14.0.0-next.15" (was "13.3.5")...
  UPDATE package.json (1156 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular/cli' **

❯ Remove 'defaultProject' option from workspace configuration.
  The project to use will be determined from the current working directory.
✖ Migration failed: tree.readText is not a function
  See "/private/var/folders/1w/rv526lr93cb8n33y85vpxmg00000gp/T/ng-ySs5l1/angular-errors.log" for further details.

🌍 Your Environment




ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 14.0.0-next.12
Node: 16.14.2
Package Manager: yarn 1.22.18 
OS: darwin arm64

Angular: 14.0.0-next.15
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.0-next.12
@angular-devkit/build-angular   14.0.0-next.12
@angular-devkit/core            14.0.0-next.12
@angular-devkit/schematics      14.0.0-next.12
@angular/cli                    14.0.0-next.12
@schematics/angular             14.0.0-next.12
rxjs                            7.5.5
typescript                      4.6.4

Anything else relevant?

N.A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions