angular-cli: Error: tree.branch is not a function

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Distributor ID: Ubuntu Release: 16.04 Codename: xenial

Repro steps.

.

error on command: ng new MyApp Error: tree.branch is not a function tree.branch is not a function packages installed:

The log given by the failure.

No stack trace on the console. just the error

Desired functionality.

The command must create a new angular application in the new folder MyApp with the necessary .ts files, component files and html files.

Mention any other details that might be useful.

packages installed are express and angular/cli only

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

I was able to get it to work by deleting my local node_modules folder and then running the “ng new” command.

Hi All,

For what it is worth I too resolved this issue by running npm update . I was then able to create services and components in an angular app I was working on.

I had the same error. I was able to solve it by a simple npm update in the home directory

@alkopop79 @GaganTut has the solution. Delete the node_modules folder in the home directory.