angular-cli: Cannot initialize a new project after installing angular/cli 1.4.7 - 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.
@angular/cli: 1.4.7 node: 8.6.0 os: linux x64
Repro steps.
- Installed Ubuntu GNOME 16.04
- Installed npm, node, angular/cli
- Tried to create a new angular project
The log given by the failure.
Error: tree.branch is not a function tree.branch is not a function
Desired functionality.
To create a new angular project
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 18 (1 by maintainers)
Doing this worked for me. Thanks to @dharders
i.e.
Then after manual deletion of sub-directories:
Then ng new works without any problems.
@yeshesvi Thanks for your example, your solution works for me. I delete duplicated rxjs folders and files. Then issue is solved.
tree.branch is not a function
is being worked on, but in the meantime I can tell you why it happens; you have two different RxJS installed in your node_modules, and your schematics is using one while the CLI is using another. Check your dependencies withnpm ls
@rolandoesc found a solution…
Documentation from https://github.com/angular/angular-cli helped… its not a global installation but works fine